From 5e51b642f747547c737a7abbc37e65b0f630d188 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Mon, 13 Feb 2017 10:58:23 +0100 Subject: build: Use macOS' compatibility macros to enable all features. * configure.ac: On macOS, use the compatibility macros to expose every feature of the libc. This is the equivalent of _GNU_SOURCE on GNU libc. -- Not defining this leads to compilation errors or superfluous warnings on macOS. GnuPG-bug-id: 2910 Signed-off-by: Justus Winter --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a44f0c8..d5c6887 100644 --- a/configure.ac +++ b/configure.ac @@ -81,7 +81,7 @@ AC_PROG_AWK AC_CHECK_TOOL(AR, ar, :) AC_GNU_SOURCE -# Set some internal variables depending on the platform for later use. +# Set some variables depending on the platform for later use. have_w32_system=no have_w64_system=no have_w32ce_system=no @@ -97,6 +97,12 @@ case "${host}" in *-mingw32*) have_w32_system=yes ;; + *-apple-darwin*) + # This is the equivalent of the _GNU_SOURCE feature-test-macro + # on GNU libc systems. + AC_DEFINE(_DARWIN_C_SOURCE, 900000L, + Expose all libc features (__DARWIN_C_FULL).) + ;; *) ;; esac -- cgit v1.2.3