summaryrefslogtreecommitdiff
path: root/external/nss/nss-android.patch.1
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2017-11-22 23:08:06 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2018-01-18 14:44:25 +0100
commit4082a18406c18af7b4fcef7bd501c3679c3be56b (patch)
tree761952db6eea1fc3fab672a8d739562eaf1fb031 /external/nss/nss-android.patch.1
parent0e8d0fe001ceecea95ad7115b835527e13252a17 (diff)
android: use unified headers and llvm-c++ STL (x86) with NDK 16
gnustl (and others) are to be removed in future versions of the ndk also bump gradle and build-tools to current versions along with it arm unfortunately crashes with llvm-c++, so keep with gnustl for now/fix that later Change-Id: Ic794c3293b599b77ec48096bf3283a99c09cbb79 Reviewed-on: https://gerrit.libreoffice.org/45163 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'external/nss/nss-android.patch.1')
-rw-r--r--external/nss/nss-android.patch.130
1 files changed, 28 insertions, 2 deletions
diff --git a/external/nss/nss-android.patch.1 b/external/nss/nss-android.patch.1
index 0e91502bdfd0..6dc43c1b4ffe 100644
--- a/external/nss/nss-android.patch.1
+++ b/external/nss/nss-android.patch.1
@@ -39,11 +39,37 @@ diff -ur nss.org/nspr/configure nss/nspr/configure
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,7 @@
+@@ -62,6 +62,6 @@
ifeq ($(OS_TARGET),Android)
NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) \
- --target=$(ANDROID_PREFIX) \
+- --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__)
+