examples/performance-thread: fix build with pkg-config
authorDavid Marchand <david.marchand@redhat.com>
Sat, 14 Nov 2020 09:05:30 +0000 (10:05 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 15 Nov 2020 14:31:15 +0000 (15:31 +0100)
commite0216ac509558b2b95d34f5b4df604e0e4d0bf1e
tree615109ff92a775126ba0fd06cea366320d78a078
parent9bb2997cb7a9e9fa286c13fabe392e544b95158b
examples/performance-thread: fix build with pkg-config

main.c: In function ‘lthread_tx’:
main.c:2091:25: error: implicit declaration of function ‘sched_getcpu’;
 did you mean ‘sched_getparam’? [-Werror=implicit-function-declaration]
 2091 |  tx_conf->conf.cpu_id = sched_getcpu();
      |                         ^~~~~~~~~~~~
      |                         sched_getparam
cc1: all warnings being treated as errors

Explicitly pass _GNU_SOURCE and include missing header (rather than
rely on automagic inclusion from other system headers).

Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
examples/performance-thread/l3fwd-thread/main.c