numam-dpdk/app
Marcin Smoczynski 28188cee2a build: enable BSD features visibility for FreeBSD
When a component uses either XOPEN_SOURCE or POSIX_C_SOURCE macro
explicitly in its build recipe, it restricts visibility of a non POSIX
features subset, such as IANA protocol numbers (IPPROTO_* macros).
Non standard features are enabled by default for DPDK both for Linux
thanks to _GNU_SOURCE and for FreeBSD thanks to __BSD_VISIBLE. However
using XOPEN_SOURCE or POSIX_(C_)SOURCE in a component causes
__BSD_VISIBLE to be defined to 0 for FreeBSD, causing different feature
sets visibility for Linux and FreeBSD. It restricts from using IPPROTO
macros in public headers, such as rte_ip.h, despite the fact they are
already widely used in sources.

Add __BSD_VISIBLE macro specified unconditionally for FreeBSD targets
which enforces feature sets visibility unification between Linux and
FreeBSD.

Add single -D_GNU_SOURCE to config/meson.build as a project argument
instead of adding separate directive for each project subtree.

This patch solves the problem of build breaks for [1] on FreeBSD [2]
following the discussion [3].

[1] https://mails.dpdk.org/archives/dev/2019-May/131885.html
[2] http://mails.dpdk.org/archives/test-report/2019-May/082263.html
[3] https://mails.dpdk.org/archives/dev/2019-May/132110.html

Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-06-26 16:50:33 +02:00
..
pdump net: add rte prefix to ether structures 2019-05-24 13:34:45 +02:00
proc-info eal: promote some experimental functions as stable 2019-04-21 19:11:37 +02:00
test test: skip meson dependency checks if not required 2019-06-05 18:53:10 +02:00
test-acl net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
test-bbdev app/bbdev: replace sprintf with snprintf or strlcpy 2019-04-22 21:32:10 +02:00
test-cmdline app/cmdline: move from test directory 2019-02-26 15:24:11 +01:00
test-compress-perf app/compress-perf: add incompressible data handling 2019-04-02 16:50:24 +02:00
test-crypto-perf app/crypto-perf: check range of socket id 2019-04-18 16:01:28 +02:00
test-eventdev net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
test-pipeline net: add rte prefix to IP structure 2019-05-24 13:34:46 +02:00
test-pmd app/testpmd: drop the workaround for virtio-user 2019-06-20 23:42:04 +02:00
Makefile test: move to app directory 2019-02-26 15:29:27 +01:00
meson.build build: enable BSD features visibility for FreeBSD 2019-06-26 16:50:33 +02:00