summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-01-20 21:27:43 +0100
committerandroid-build-merger <android-build-merger@google.com>2017-01-20 21:27:43 +0100
commitf21b6c0d1df62fac6af2226a8ef7046738e21446 (patch)
tree0aa1020d71e0fb9953bf5b6d4efd964dae538db4
parentDO NOT MERGE: resolve merge conflicts of 5346da02 to klp-modular-dev am: 4eb997d52b -s ours am: 3591cb48f5 -s ours am: 8bdb13dd9a am: 0d750f900b -s ours am: 457ad2dc3c am: d1c3bdd8c2 am: 9930b28456 am: 0a627e5a5f -s ours am: 510b13acd8 am: 3d1f19c733 am: 8e267878cc am: 99e38bf254 am: e4dcbd1c9e (diff)
parentMerge "imgpatch: Compile with ZLIB_CONST defined." am: e78ca37656 am: ca261d3b48 (diff)
downloadandroid_bootable_recovery-f21b6c0d1df62fac6af2226a8ef7046738e21446.tar
android_bootable_recovery-f21b6c0d1df62fac6af2226a8ef7046738e21446.tar.gz
android_bootable_recovery-f21b6c0d1df62fac6af2226a8ef7046738e21446.tar.bz2
android_bootable_recovery-f21b6c0d1df62fac6af2226a8ef7046738e21446.tar.lz
android_bootable_recovery-f21b6c0d1df62fac6af2226a8ef7046738e21446.tar.xz
android_bootable_recovery-f21b6c0d1df62fac6af2226a8ef7046738e21446.tar.zst
android_bootable_recovery-f21b6c0d1df62fac6af2226a8ef7046738e21446.zip
-rw-r--r--applypatch/Android.mk12
-rw-r--r--applypatch/imgpatch.cpp2
2 files changed, 10 insertions, 4 deletions
diff --git a/applypatch/Android.mk b/applypatch/Android.mk
index 85b5c9fcd..bdaef1b27 100644
--- a/applypatch/Android.mk
+++ b/applypatch/Android.mk
@@ -35,7 +35,9 @@ LOCAL_STATIC_LIBRARIES := \
libcrypto \
libbz \
libz
-LOCAL_CFLAGS := -Werror
+LOCAL_CFLAGS := \
+ -DZLIB_CONST \
+ -Werror
include $(BUILD_STATIC_LIBRARY)
# libimgpatch (static library)
@@ -54,7 +56,9 @@ LOCAL_STATIC_LIBRARIES := \
libcrypto \
libbz \
libz
-LOCAL_CFLAGS := -Werror
+LOCAL_CFLAGS := \
+ -DZLIB_CONST \
+ -Werror
include $(BUILD_STATIC_LIBRARY)
# libimgpatch (host static library)
@@ -74,7 +78,9 @@ LOCAL_STATIC_LIBRARIES := \
libcrypto \
libbz \
libz
-LOCAL_CFLAGS := -Werror
+LOCAL_CFLAGS := \
+ -DZLIB_CONST \
+ -Werror
include $(BUILD_HOST_STATIC_LIBRARY)
# libapplypatch_modes (static library)
diff --git a/applypatch/imgpatch.cpp b/applypatch/imgpatch.cpp
index ae6071f0e..00ea90efa 100644
--- a/applypatch/imgpatch.cpp
+++ b/applypatch/imgpatch.cpp
@@ -160,7 +160,7 @@ int ApplyImagePatch(const unsigned char* old_data, ssize_t old_size, const Value
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
strm.avail_in = src_len;
- strm.next_in = const_cast<unsigned char*>(old_data + src_start);
+ strm.next_in = old_data + src_start;
strm.avail_out = expanded_len;
strm.next_out = expanded_source.data();