The __rte_internal macro is defined dependent on the value of the build environment variable BUILDING_RTE_SDK. This variable was set in the Makefile environment but not the meson environment, so lets reconcile the two by defining it for meson in the lib and drivers directories, but not the examples/apps directories, which should be treated as they are not part of the core DPDK library
Signed-off-by: Neil Horman <nhor...@tuxdriver.com> CC: Jerin Jacob Kollanukkaran <jer...@marvell.com> CC: Bruce Richardson <bruce.richard...@intel.com> CC: Thomas Monjalon <tho...@monjalon.net> --- drivers/meson.build | 1 + lib/meson.build | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/meson.build b/drivers/meson.build index 4c444f495..a312277d1 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -23,6 +23,7 @@ endif # specify -D_GNU_SOURCE unconditionally default_cflags += '-D_GNU_SOURCE' +default_cflags += '-DBUILDING_RTE_SDK' foreach class:dpdk_driver_classes drivers = [] diff --git a/lib/meson.build b/lib/meson.build index e067ce5ea..0e398d534 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -35,6 +35,7 @@ if is_windows endif default_cflags = machine_args +default_cflags += '-DBUILDING_RTE_SDK' if cc.has_argument('-Wno-format-truncation') default_cflags += '-Wno-format-truncation' endif -- 2.20.1