From: Thomas Monjalon Date: Sun, 19 Jun 2016 21:03:52 +0000 (+0200) Subject: eal/linux: fix build with glibc < 2.12 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=368e2624f23a541831491a61fc0082d9b6008cd8;p=dpdk.git eal/linux: fix build with glibc < 2.12 The function rte_thread_setname needs glibc 2.12, otherwise it returns -1 without using any parameter. The macro RTE_SET_USED avoids an "unused parameter" warning. Fixes: 3901ed99c2f8 ("eal: fix thread naming on FreeBSD") Signed-off-by: Thomas Monjalon --- diff --git a/lib/librte_eal/linuxapp/eal/eal_thread.c b/lib/librte_eal/linuxapp/eal/eal_thread.c index 8c3bf035a9..9f88530ea1 100644 --- a/lib/librte_eal/linuxapp/eal/eal_thread.c +++ b/lib/librte_eal/linuxapp/eal/eal_thread.c @@ -206,5 +206,7 @@ int rte_thread_setname(pthread_t id, const char *name) ret = pthread_setname_np(id, name); #endif #endif + RTE_SET_USED(id); + RTE_SET_USED(name); return ret; }