osx: Add -D_DARWIN_C_SOURCE to CFLAGS
authorHenrik Gramner <henrik@gramner.com>
Tue, 12 Apr 2016 19:33:54 +0000 (21:33 +0200)
committerHenrik Gramner <henrik@gramner.com>
Tue, 12 Apr 2016 19:47:47 +0000 (21:47 +0200)
OSX doesn't like _POSIX_C_SOURCE being defined when _DARWIN_C_SOURCE isn't.

configure

index 732b6c9..f9856bd 100755 (executable)
--- a/configure
+++ b/configure
@@ -570,6 +570,7 @@ case $host_os in
     darwin*)
         SYS="MACOSX"
         libm="-lm"
+        CFLAGS="$CFLAGS -D_DARWIN_C_SOURCE"
         if [ "$pic" = "no" ]; then
             cc_check "" -mdynamic-no-pic && CFLAGS="$CFLAGS -mdynamic-no-pic"
         fi