From ff78b05c59e400df9c7248254339fa59d72b6d53 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Thu, 7 Aug 2014 10:11:45 -0600 Subject: [PATCH] fix crash in Posix_getaddrinfo for ProGuarded Android build Posix_getaddrinfo needs to access fields in libcore.io.StructAddrinfo via JNI, so we tell ProGuard to preserve them. This commit also includes a minor indentation tweek in README.md and removes -fno-rtti from lzma-build-cflags to avoid a warning from GCC. --- README.md | 2 +- android.pro | 4 +++- makefile | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c80cf2dbc4..a33af84539 100644 --- a/README.md +++ b/README.md @@ -507,7 +507,7 @@ setting the boot classpath to "[bootJar]". $ cat >embedded-jar-main.cpp <; + } -keep class libcore.io.StructFlock -keep class libcore.io.StructGroupReq -keep class libcore.io.StructLinger diff --git a/makefile b/makefile index a5130fcac2..2e004f3bde 100755 --- a/makefile +++ b/makefile @@ -1294,8 +1294,8 @@ ifneq ($(lzma),) lzma-encoder = $(build)/lzma/lzma - lzma-build-cflags = -D_7ZIP_ST -D__STDC_CONSTANT_MACROS -fno-rtti \ - -fno-exceptions -I$(lzma)/C + lzma-build-cflags = -D_7ZIP_ST -D__STDC_CONSTANT_MACROS \ + -fno-exceptions -fPIC -I$(lzma)/C lzma-cflags = $(lzma-build-cflags) $(classpath-extra-cflags)