[x264-devel] osx: Add -D_DARWIN_C_SOURCE to CFLAGS

Henrik Gramner git at videolan.org
Tue Apr 12 22:13:02 CEST 2016


x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Tue Apr 12 21:33:54 2016 +0200| [64f4e24909924fceeea6e154d71b7dfbf586c7ea] | committer: Henrik Gramner

osx: Add -D_DARWIN_C_SOURCE to CFLAGS

OSX doesn't like _POSIX_C_SOURCE being defined when _DARWIN_C_SOURCE isn't.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=64f4e24909924fceeea6e154d71b7dfbf586c7ea
---

 configure |    1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index 732b6c9..f9856bd 100755
--- 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



More information about the x264-devel mailing list