[Android] Fix compile issue with NANF in Darwin.

Paulo Vitor Magacho da Silva git at videolan.org
Tue Nov 25 11:39:03 CET 2014


vlc-ports/android | branch: master | Paulo Vitor Magacho da Silva <pvmagacho at gmail.com> | Mon Nov 24 22:28:51 2014 -0200| [6efb37a1728d879fbe9c1f6c2725727c2c98ae16] | committer: Jean-Baptiste Kempf

Fix compile issue with NANF in Darwin.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=6efb37a1728d879fbe9c1f6c2725727c2c98ae16
---

 compile.sh |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/compile.sh b/compile.sh
index 6a75740..396f230 100755
--- a/compile.sh
+++ b/compile.sh
@@ -363,10 +363,17 @@ fi
 # ANDROID NDK FIXUP (BLAME GOOGLE)
 config_undef ()
 {
-    previous_change=`stat -c "%y" config.h`
-    sed -i 's,#define '$1' 1,/\* #undef '$1' \*/,' config.h
-    # don't change modified date in order to don't trigger a full build
-    touch -d "$previous_change" config.h
+    unamestr=`uname`
+    if [[ "$unamestr" == 'Darwin' ]]; then
+        previous_change=`stat -f "%Sm" -t "%y%m%d%H%M.%S" config.h`
+        sed -i '' 's,#define '$1' 1,/\* #undef '$1' \*/,' config.h
+        touch -t "$previous_change" config.h
+    else
+        previous_change=`stat -c "%y" config.h`
+        sed -i 's,#define '$1' 1,/\* #undef '$1' \*/,' config.h
+        # don't change modified date in order to don't trigger a full build
+        touch -d "$previous_change" config.h
+    fi
 }
 
 # if config dependencies change, ./config.status



More information about the Android mailing list