mk: build with _GNU_SOURCE defined by default
[dpdk.git] / lib / meson.build
index 71f35d1..24351cc 100644 (file)
@@ -30,6 +30,12 @@ default_cflags = machine_args
 if cc.has_argument('-Wno-format-truncation')
        default_cflags += '-Wno-format-truncation'
 endif
+
+enabled_libs = [] # used to print summary at the end
+
+# -D_GNU_SOURCE unconditionally
+default_cflags += '-D_GNU_SOURCE'
+
 foreach l:libraries
        build = true
        name = l
@@ -55,6 +61,7 @@ foreach l:libraries
        subdir(dir_name)
 
        if build
+               enabled_libs += name
                dpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1)
                install_headers(headers)