summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@google.com>2014-10-15 23:38:17 -0700
committerXavier Ducrohet <xav@google.com>2014-10-16 07:49:16 +0000
commitcd1da4e04f0eb71a92a586c66acd0e34115608e1 (patch)
tree94d5059c7930c90ed7afa10bbc2a0727a08aee3a
parent67f46cb0e137edbf4a6f7014ca8a3a58484016d1 (diff)
downloadsystem_core-cd1da4e04f0eb71a92a586c66acd0e34115608e1.zip
system_core-cd1da4e04f0eb71a92a586c66acd0e34115608e1.tar.gz
system_core-cd1da4e04f0eb71a92a586c66acd0e34115608e1.tar.bz2
Fix toolchain issue for windows build of libziparchive.
With mingw 4.8, the new default packed behavior is broken and makes zip archive fails due to unexpected misalignment in CentralDirectoryRecord. This patch uses -mno-ms-bitfields to revert to the old packed behavior. Change-Id: Ic977c841e330e19451db1d31ddb22e570a525062
-rw-r--r--libziparchive/Android.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/libziparchive/Android.mk b/libziparchive/Android.mk
index 705caa5..d23a94f 100644
--- a/libziparchive/Android.mk
+++ b/libziparchive/Android.mk
@@ -42,6 +42,9 @@ LOCAL_C_INCLUDES += ${includes}
LOCAL_STATIC_LIBRARIES := libz libutils
LOCAL_MODULE:= libziparchive-host
LOCAL_CFLAGS := -Werror
+ifneq ($(strip $(USE_MINGW)),)
+ LOCAL_CFLAGS += -mno-ms-bitfields
+endif
LOCAL_MULTILIB := both
include $(BUILD_HOST_STATIC_LIBRARY)