imgpatch: Compile with ZLIB_CONST defined.

So z_stream.next_in takes pointer to const data.

Test: mmma bootable/recovery/applypatch
Change-Id: If269b766a7c84fa2f67424ee61ba5afab0159261
This commit is contained in:
Tao Bao
2017-01-19 10:46:39 -08:00
parent 13d15af08f
commit 087bc0c7d3
2 changed files with 10 additions and 4 deletions

View File

@@ -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();