New upstream version 17.11.4
[deb_dpdk.git] / lib / librte_eal / linuxapp / eal / eal_thread.c
index 6481eee..c3947d7 100644 (file)
@@ -46,7 +46,6 @@
 #include <rte_launch.h>
 #include <rte_log.h>
 #include <rte_memory.h>
-#include <rte_memzone.h>
 #include <rte_per_lcore.h>
 #include <rte_eal.h>
 #include <rte_lcore.h>
@@ -206,7 +205,7 @@ int rte_sys_gettid(void)
 
 int rte_thread_setname(pthread_t id, const char *name)
 {
-       int ret = -1;
+       int ret = ENOSYS;
 #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
 #if __GLIBC_PREREQ(2, 12)
        ret = pthread_setname_np(id, name);
@@ -214,5 +213,5 @@ int rte_thread_setname(pthread_t id, const char *name)
 #endif
        RTE_SET_USED(id);
        RTE_SET_USED(name);
-       return ret;
+       return -ret;
 }