From 8d8b9e371c33c9bc455245db35101585dcfb48e5 Mon Sep 17 00:00:00 2001 From: Tobias Wiese Date: Tue, 1 Mar 2022 01:11:13 +0100 Subject: Define feature test macros in Makefile To prevent other people from copying the definition of the feature test macro into their multi-file c project or the unlikely case that this project will contain more than one c file at some point. --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 915330f..62226b8 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,9 @@ endif INSTALL = install -CFLAGS += -Wall -DVERSION="\"$(VERSION)\"" -DBUILD_DATE="\"$(BUILD_DATE)\"" +FEATURE_TEST_MACROS = _GNU_SOURCE +CFLAGS += -Wall $(addprefix -D, $(FEATURE_TEST_MACROS)) \ + -DVERSION="\"$(VERSION)\"" -DBUILD_DATE="\"$(BUILD_DATE)\"" LDFLAGS += TARGETS := exchange -- cgit v1.2.3