numam-dpdk/examples
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
..
bbdev_app net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
bond net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
bpf examples/bpf: move from test directory 2019-02-26 15:29:07 +01:00
cmdline examples: fix make clean when using pkg-config 2019-05-20 23:57:47 +02:00
distributor net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
ethtool net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
eventdev_pipeline net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
exception_path examples: fix make clean when using pkg-config 2019-05-20 23:57:47 +02:00
fips_validation examples: fix make clean when using pkg-config 2019-05-20 23:57:47 +02:00
flow_classify net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
flow_filtering net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
helloworld examples: fix make clean when using pkg-config 2019-05-20 23:57:47 +02:00
ip_fragmentation examples/ip_fragmentation: fix Tx queues init 2019-06-04 12:45:41 +02:00
ip_pipeline net: add rte prefix to TCP structure 2019-05-24 13:34:46 +02:00
ip_reassembly net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
ipsec-secgw net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
ipv4_multicast net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
kni kni: remove ethtool support 2019-05-29 23:38:45 +02:00
l2fwd net: add rte prefix to ether functions 2019-05-24 13:34:45 +02:00
l2fwd-cat net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
l2fwd-crypto net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
l2fwd-jobstats net: add rte prefix to ether functions 2019-05-24 13:34:45 +02:00
l2fwd-keepalive net: add rte prefix to ether functions 2019-05-24 13:34:45 +02:00
l3fwd net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
l3fwd-acl net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
l3fwd-power net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
l3fwd-vf net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
link_status_interrupt net: add rte prefix to ether functions 2019-05-24 13:34:45 +02:00
load_balancer net: add rte prefix to IP structure 2019-05-24 13:34:46 +02:00
multi_process examples/multi_process: fix FreeBSD build 2019-06-05 15:13:06 +02:00
netmap_compat replace snprintf with strlcpy without adding extra include 2019-04-04 22:45:54 +02:00
packet_ordering net: add rte prefix to ether structures 2019-05-24 13:34:45 +02:00
performance-thread net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
ptpclient net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
qos_meter net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
qos_sched examples/qos_sched: do not dereference global config struct 2019-05-30 00:30:17 +02:00
quota_watermark net: add rte prefix to ether functions 2019-05-24 13:34:45 +02:00
rxtx_callbacks examples/rxtx_callbacks: support HW timestamp 2019-06-06 20:21:20 +09:00
server_node_efd fix off-by-one errors in snprintf 2019-05-29 13:02:53 +02:00
service_cores examples: fix make clean when using pkg-config 2019-05-20 23:57:47 +02:00
skeleton net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
tep_termination net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
timer examples: fix make clean when using pkg-config 2019-05-20 23:57:47 +02:00
vdpa examples/vdpa: remove trace of legacy linuxapp 2019-06-20 23:42:04 +02:00
vhost net: replace IPv4/v6 constants with uppercase name 2019-06-03 16:54:54 +02:00
vhost_crypto examples/vhost_crypto: remove unused function 2019-06-20 23:42:04 +02:00
vhost_scsi build: remove unnecessary large file support defines 2019-06-03 23:55:50 +02:00
vm_power_manager net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
vmdq net: add rte prefix to ether functions 2019-05-24 13:34:45 +02:00
vmdq_dcb net: add rte prefix to ether functions 2019-05-24 13:34:45 +02:00
Makefile examples/distributor: detect high frequency cores 2019-04-02 02:22:32 +02:00
meson.build build: enable BSD features visibility for FreeBSD 2019-06-26 16:50:33 +02:00