From 5d31a75b7c24feb58b32425ea118225210227817 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Sun, 19 Jun 2016 17:58:07 -0700 Subject: [PATCH] Android: Create an ANDROID_64 preprocessor define to deal with changes between Android API 9 and Android API 21 in the native development kit. Ideally we would upgrade all platforms en mass, but forcing ARM, MIPS, and x86 to API 21 might introduce compatibility problems with our existing install base. --- android/build_boinc_arm64.sh | 4 ++-- android/build_boinc_x86_64.sh | 4 ++-- client/hostinfo_unix.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/android/build_boinc_arm64.sh b/android/build_boinc_arm64.sh index 85e0c29ff7..374423fbdb 100755 --- a/android/build_boinc_arm64.sh +++ b/android/build_boinc_arm64.sh @@ -22,8 +22,8 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin" export CC=aarch64-linux-android-gcc export CXX=aarch64-linux-android-g++ export LD=aarch64-linux-android-ld -export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE" -export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE" +export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DANDROID_64 -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE" +export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -DANDROID_64 -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE" export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie" export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include" export PKG_CONFIG_SYSROOT_DIR=$TCSYSROOT diff --git a/android/build_boinc_x86_64.sh b/android/build_boinc_x86_64.sh index c1bc7b4025..cc55ea5115 100755 --- a/android/build_boinc_x86_64.sh +++ b/android/build_boinc_x86_64.sh @@ -22,8 +22,8 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin" export CC=x86_64-linux-android-gcc export CXX=x86_64-linux-android-g++ export LD=x86_64-linux-android-ld -export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE" -export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE" +export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DANDROID_64 -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE" +export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -DANDROID_64 -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE" export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie" export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include" export PKG_CONFIG_SYSROOT_DIR=$TCSYSROOT diff --git a/client/hostinfo_unix.cpp b/client/hostinfo_unix.cpp index 54f577ef1f..410ae99769 100644 --- a/client/hostinfo_unix.cpp +++ b/client/hostinfo_unix.cpp @@ -74,7 +74,7 @@ #include #if HAVE_SYS_SWAP_H -#ifdef ANDROID +#if defined(ANDROID) && !defined(ANDROID_64) #include #else #include