telemetry: fix build on FreeBSD < 12.2
authorThomas Monjalon <thomas@monjalon.net>
Wed, 21 Apr 2021 17:51:24 +0000 (19:51 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 21 Apr 2021 18:07:59 +0000 (20:07 +0200)
commit027c931be8ab98db070edf48501f5c6226c92008
tree23d05d529a3c33180fd543ff3cca990695d6e3bc
parent606a234c6d3607c93a0426bdccdbf9aaa2b8e5f6
telemetry: fix build on FreeBSD < 12.2

The function pthread_setname_np() was originally not available on
FreeBSD. It has been added in FreeBSD 12.2:
https://svnweb.freebsd.org/base?view=revision&revision=362264

The EAL implementation of rte_thread_setname() is duplicated
in the telemetry library, which does not depend on EAL,
so the compilation is safe in all systems.

Fixes: 5da7736f8c53 ("telemetry: set socket listener thread name")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
lib/telemetry/telemetry.c