summaryrefslogtreecommitdiff
path: root/test/test
diff options
context:
space:
mode:
Diffstat (limited to 'test/test')
-rw-r--r--test/test/Makefile2
-rw-r--r--test/test/meson.build3
2 files changed, 3 insertions, 2 deletions
diff --git a/test/test/Makefile b/test/test/Makefile
index 5d8b1dc..8c347e4 100644
--- a/test/test/Makefile
+++ b/test/test/Makefile
@@ -210,8 +210,6 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
-CFLAGS += -D_GNU_SOURCE
-
LDLIBS += -lm
ifeq ($(CONFIG_RTE_COMPRESSDEV_TEST),y)
ifeq ($(CONFIG_RTE_LIBRTE_COMPRESSDEV),y)
diff --git a/test/test/meson.build b/test/test/meson.build
index 92104cd..7c6e3b0 100644
--- a/test/test/meson.build
+++ b/test/test/meson.build
@@ -253,6 +253,9 @@ if cc.has_argument('-Wno-format-truncation')
cflags += '-Wno-format-truncation'
endif
+# specify -D_GNU_SOURCE unconditionally
+default_cflags += '-D_GNU_SOURCE'
+
test_dep_objs = []
compress_test_dep = dependency('zlib', required: false)
if compress_test_dep.found()