devtools: support FreeBSD
[dpdk.git] / config / meson.build
index dbdfde6..2bafea5 100644 (file)
@@ -188,3 +188,11 @@ install_headers('rte_config.h', subdir: get_option('include_subdir_arch'))
 
 # enable VFIO only if it is linux OS
 dpdk_conf.set('RTE_EAL_VFIO', is_linux)
+
+# specify -D_GNU_SOURCE unconditionally
+add_project_arguments('-D_GNU_SOURCE', language: 'c')
+
+# specify -D__BSD_VISIBLE for FreeBSD
+if is_freebsd
+       add_project_arguments('-D__BSD_VISIBLE', language: 'c')
+endif