diff -ur nss.org/nspr/build/autoconf/config.sub nss/nspr/build/autoconf/config.sub --- nss.org/nspr/build/autoconf/config.sub 2017-09-07 15:29:45.031246453 +0200 +++ nss/nspr/build/autoconf/config.sub 2017-09-07 15:32:13.087235423 +0200 @@ -111,6 +111,9 @@ exit 1;; esac +if test $1 = "arm-unknown-linux-androideabi"; then echo $1; exit; fi +if test $1 = "i686-pc-linux-android"; then echo $1; exit; fi + # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` diff -ur nss.org/nspr/configure nss/nspr/configure --- nss.org/nspr/configure 2017-09-07 15:29:45.018246359 +0200 +++ nss/nspr/configure 2017-09-07 15:31:47.604075663 +0200 @@ -2737,18 +2739,15 @@ esac AS="$android_toolchain"/bin/"$android_tool_prefix"-as - CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc - CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++ - CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp + CC="$CC" + CXX="$CXX" + CPP="$CC" -E LD="$android_toolchain"/bin/"$android_tool_prefix"-ld AR="$android_toolchain"/bin/"$android_tool_prefix"-ar RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS" - CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS" - CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic -fno-short-enums -fno-exceptions $CXXFLAGS" - LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS" $as_echo "#define ANDROID 1" >>confdefs.h diff -ur nss.org/nss/Makefile nss/nss/Makefile --- nss.org/nss/Makefile 2017-09-07 15:29:44.933245745 +0200 +++ nss/nss/Makefile 2017-09-07 15:32:04.347181076 +0200 @@ -62,6 +62,6 @@ ifeq ($(OS_TARGET),Android) NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) \ - --target=$(ANDROID_PREFIX) \ + --with-arch=toolchain-default \ --with-android-version=$(OS_TARGET_RELEASE) \ --with-android-toolchain=$(ANDROID_TOOLCHAIN) \ --with-android-platform=$(ANDROID_SYSROOT) unified headers / ndk16 does have it in it's support module diff -ur nss.org/nspr/pr/src/md/unix/unix.c nss/nspr/pr/src/md/unix/unix.c --- nss.org/nspr/pr/src/md/unix/unix.c 2017-11-22 01:19:16.098553361 +0100 +++ nss/nspr/pr/src/md/unix/unix.c 2017-11-22 01:20:03.794550181 +0100 @@ -2714,21 +2714,6 @@ #endif /* defined(_PR_NO_LARGE_FILES) || defined(SOLARIS2_5) */ /* Android <= 19 doesn't have mmap64. */ -#if defined(ANDROID) && __ANDROID_API__ <= 19 -PR_IMPORT(void) *__mmap2(void *, size_t, int, int, int, size_t); - -#define ANDROID_PAGE_SIZE 4096 - -static void * -mmap64(void *addr, size_t len, int prot, int flags, int fd, loff_t offset) -{ - if (offset & (ANDROID_PAGE_SIZE - 1)) { - errno = EINVAL; - return MAP_FAILED; - } - return __mmap2(addr, len, prot, flags, fd, offset / ANDROID_PAGE_SIZE); -} -#endif #if defined(OSF1) && defined(__GNUC__)