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

Henrik Gramner git at videolan.org
Tue Apr 12 22:19:15 CEST 2016


x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Tue Apr 12 21:33:54 2016 +0200| [40391a30a1c7cff98d661f3ec0d229174c90fe78] | 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=40391a30a1c7cff98d661f3ec0d229174c90fe78
---

 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