git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common/octeontx2: fix memory mapping API usage
[dpdk.git]
/
lib
/
librte_eal
/
linux
/
eal_thread.c
diff --git
a/lib/librte_eal/linux/eal_thread.c
b/lib/librte_eal/linux/eal_thread.c
index
48a2c11
..
068de25
100644
(file)
--- a/
lib/librte_eal/linux/eal_thread.c
+++ b/
lib/librte_eal/linux/eal_thread.c
@@
-153,7
+153,10
@@
int rte_thread_setname(pthread_t id, const char *name)
int ret = ENOSYS;
#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
#if __GLIBC_PREREQ(2, 12)
int ret = ENOSYS;
#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
#if __GLIBC_PREREQ(2, 12)
- ret = pthread_setname_np(id, name);
+ char truncated[16];
+
+ strlcpy(truncated, name, sizeof(truncated));
+ ret = pthread_setname_np(id, truncated);
#endif
#endif
RTE_SET_USED(id);
#endif
#endif
RTE_SET_USED(id);