summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Schmidt <git@ryandesign.com>2022-01-08 16:06:51 -0600
committerDaniel Friesel <derf@finalrewind.org>2022-01-21 19:45:20 +0100
commit617e1f3a75fedb01af851694fe31df5b859239a2 (patch)
tree298393ea858a8a1df58d687ca27e189495332c1e
parentc4e9570d2e465e774f0e2f6da9526524776a9a8c (diff)
Define _DARWIN_C_SOURCE for mkdtemp and mkstemps
When _POSIX_C_SOURCE is defined, macOS hides the definitions of mkdtemp and mkstemps, among others. Define _DARWIN_C_SOURCE to counteract that.
-rw-r--r--config.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.mk b/config.mk
index 35fdf4b..2d63f72 100644
--- a/config.mk
+++ b/config.mk
@@ -39,7 +39,7 @@ CFLAGS ?= -g -O2
CFLAGS += -Wall -Wextra -pedantic
# Settings for glibc >= 2.19 - may need to be adjusted for other systems
-CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700
+CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE
ifeq (${curl},1)
CFLAGS += -DHAVE_LIBCURL