eal/linux: fix build with glibc < 2.12
authorFerruh Yigit <ferruh.yigit@intel.com>
Wed, 25 Nov 2015 11:13:55 +0000 (11:13 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 25 Nov 2015 13:41:37 +0000 (14:41 +0100)
commitbadb3688ffa8e9731770e686ba84123783060c1b
treecaca8dfe220dcb73a4d72b1481a9e34817039d15
parentd2f9052b5bf87cc2ad3da9b1b5a53b3d563df09a
eal/linux: fix build with glibc < 2.12

pthread_setname_np() function added in glibc 2.12, using this function
in older glibc versions cause compile error:
error: implicit declaration of function "pthread_setname_np"

This patch adds "rte_thread_setname" macro and set it according
glibc >= 2.12 check, thread naming disabled for older glibc versions,
glibc versions that support "pthread_setname_np" will keep using this
function.

Fixes: 67b6d3039e9e ("eal: set name to threads")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
examples/tep_termination/main.c
examples/vhost/main.c
examples/vhost_xen/main.c
lib/librte_eal/common/include/rte_lcore.h
lib/librte_eal/linuxapp/eal/eal.c
lib/librte_eal/linuxapp/eal/eal_interrupts.c
lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c
lib/librte_eal/linuxapp/eal/eal_timer.c