numam-dpdk/drivers
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
..
baseband bb/turbo_sw: update for FlexRAN 18.09 2018-12-19 11:19:10 +01:00
bus bus/pci: fix TOCTOU for sysfs access 2019-06-14 16:33:56 +09:00
common drivers: add init and fini on octeontx2 NPA object 2019-06-25 23:35:57 +02:00
compress compress/qat: fix dataplane return 2019-04-18 16:01:28 +02:00
crypto crypto/aesni_mb: fix build with gcc 4.8.5 2019-06-05 18:37:08 +02:00
event build: add libatomic dependency for 32-bit clang 2019-06-03 23:57:43 +02:00
mempool mempool/octeontx2: add devargs for max pool selection 2019-06-25 23:35:57 +02:00
net net/bnx2x: fix icc build 2019-06-26 09:14:24 +02:00
raw doc: fix spelling reported by aspell in comments 2019-05-03 00:38:14 +02:00
Makefile drivers: add common as dependency for bus 2018-10-16 14:54:25 +02:00
meson.build build: enable BSD features visibility for FreeBSD 2019-06-26 16:50:33 +02:00