summaryrefslogtreecommitdiff
path: root/examples/vhost_scsi
diff options
context:
space:
mode:
authorAnatoly Burakov <anatoly.burakov@intel.com>2018-10-04 11:20:33 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-10-22 11:28:27 +0200
commit5d7b673d5fd6663b20c675dd382d9fb43b42af18 (patch)
tree8cb3ffb659e34cc2d7eadda1880be3d6be885fa4 /examples/vhost_scsi
parent739e13bcc98f562d3301f808ec76507ebae82e63 (diff)
downloaddpdk-5d7b673d5fd6663b20c675dd382d9fb43b42af18.zip
dpdk-5d7b673d5fd6663b20c675dd382d9fb43b42af18.tar.gz
dpdk-5d7b673d5fd6663b20c675dd382d9fb43b42af18.tar.xz
mk: build with _GNU_SOURCE defined by default
We use _GNU_SOURCE all over the place, but often times we miss defining it, resulting in broken builds on musl. Rather than fixing every library's and driver's and application's makefile, fix it by simply defining _GNU_SOURCE by default for all builds. Remove all usages of _GNU_SOURCE in source files and makefiles, and also fixup a couple of instances of using __USE_GNU instead of _GNU_SOURCE. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Diffstat (limited to 'examples/vhost_scsi')
-rw-r--r--examples/vhost_scsi/Makefile4
-rw-r--r--examples/vhost_scsi/meson.build2
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile
index fa0cf72..523aee0 100644
--- a/examples/vhost_scsi/Makefile
+++ b/examples/vhost_scsi/Makefile
@@ -18,7 +18,7 @@ shared: build/$(APP)-shared
static: build/$(APP)-static
ln -sf $(APP)-static build/$(APP)
-CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+CFLAGS += -D_FILE_OFFSET_BITS=64
LDFLAGS += -pthread
PC_FILE := $(shell pkg-config --path libdpdk)
@@ -57,7 +57,7 @@ please change the definition of the RTE_TARGET environment variable)
all:
else
-CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+CFLAGS += -D_FILE_OFFSET_BITS=64
CFLAGS += -O2
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/vhost_scsi/meson.build b/examples/vhost_scsi/meson.build
index 5f92370..2303bca 100644
--- a/examples/vhost_scsi/meson.build
+++ b/examples/vhost_scsi/meson.build
@@ -10,7 +10,7 @@ if host_machine.system() != 'linux'
build = false
endif
deps += 'vhost'
-cflags += ['-D_GNU_SOURCE','-D_FILE_OFFSET_BITS=64']
+cflags += ['-D_FILE_OFFSET_BITS=64']
sources = files(
'scsi.c', 'vhost_scsi.c'
)