summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 99875d3..e2fcb7e 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,8 @@ SRCS=$(shell find ./src -name '*.c')
OBJS=$(SRCS:.c=.o)
CC?=cc
DEBUG=-g3 -ggdb3
-CFLAGS+=-c -Wall -std=c99 -pedantic $(DEBUG)
+# Enable POSIX extensions (e.g. strdup) before any system headers are seen
+CFLAGS+=-c -Wall -std=c99 -pedantic -D_POSIX_C_SOURCE=200809L $(DEBUG)
LDADD+=
HEADER?=docs/header.txt
# Detect the OS name for updating build.h