]> git.meshlink.io Git - meshlink/commitdiff
Fix a compile error on macOS when using an older version of autoconf.
authorGuus Sliepen <guus@meshlink.io>
Sun, 18 Apr 2021 14:43:17 +0000 (16:43 +0200)
committerGuus Sliepen <guus@meshlink.io>
Sun, 18 Apr 2021 14:43:17 +0000 (16:43 +0200)
With autoconf 2.69, the USE_SYSTEM_EXTENSIONS macro did not enable
_DARWIN_C_SOURCE, which could cause a compile error. This is fixed in
autoconf 2.71, but in order to provide some backwards compatibility, we
manually enable _DARWIN_C_SOURCE for now.

configure.ac

index 3cf76b051995499e92d90ac4f28bbe2968c69dd1..c9adc83ab7f0dbd949af5a3e35ca58df9c0f2fde 100644 (file)
@@ -15,6 +15,7 @@ AM_SILENT_RULES([yes])
 AC_USE_SYSTEM_EXTENSIONS
 AC_DEFINE([__USE_BSD], 1, [Enable BSD extensions])
 AC_DEFINE([_POSIX_C_SOURCE], 200809L, [Enable POSIX features])
+AC_DEFINE([_DARWIN_C_SOURCE], 1, [Enable Darwin features])
 
 dnl Checks for programs.
 AM_PROG_CC_C_O