[Android] [PATCH 1/3] Fix compile issue with NANF in Darwin.

Paulo Vitor Magacho da Silva pvmagacho at gmail.com
Tue Nov 25 01:28:51 CET 2014


---
 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
-- 
1.9.3 (Apple Git-50)



More information about the Android mailing list