mirror of
https://github.com/expo/bsdiff.git
synced 2026-11-14 17:49:03 -10:00
Update Android.mk to build Chromium OS changes.
The merged CLs from Chromium OS include a new dependency in libdivsufsort and split some source files. This patch includes changes to the Android.mk to build with the new CLs. Bug: 24332905 Change-Id: Id7cc128bc7527e2c1eadc2319dd249e5746a903f Test: mmm external/bsdiff; make otatools
This commit is contained in:
1 parent
f3767966ff
commit
b7e3b8e0cc
3 files changed
+20
-8
No files matched your search
+16
-4
@@ -13,18 +13,30 @@
|
||||
# limitations under the License.
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := bsdiff.c
|
||||
bsdiff_common_cflags = -Wall -Werror -Wextra -Wno-unused-parameter
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := bsdiff
|
||||
LOCAL_SRC_FILES := \
|
||||
bsdiff.c \
|
||||
bsdiff_main.c
|
||||
LOCAL_CFLAGS := $(bsdiff_common_cflags)
|
||||
LOCAL_C_INCLUDES += external/bzip2
|
||||
LOCAL_STATIC_LIBRARIES := libbz
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libdivsufsort64 \
|
||||
libdivsufsort
|
||||
include $(BUILD_HOST_EXECUTABLE)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := bspatch.c
|
||||
LOCAL_MODULE := bspatch
|
||||
LOCAL_SRC_FILES := \
|
||||
bspatch.c \
|
||||
bspatch_main.c \
|
||||
exfile.c \
|
||||
extents.c
|
||||
LOCAL_CFLAGS := $(bsdiff_common_cflags)
|
||||
LOCAL_C_INCLUDES += external/bzip2
|
||||
LOCAL_STATIC_LIBRARIES := libbz
|
||||
include $(BUILD_HOST_EXECUTABLE)
|
||||
@@ -259,7 +259,7 @@ int bspatch(
|
||||
new_file = fopen(new_filename, "w");
|
||||
}
|
||||
if (!new_file ||
|
||||
fwrite_unlocked(new, 1, newsize, new_file) != newsize ||
|
||||
fwrite_unlocked(new, 1, newsize, new_file) != (size_t)newsize ||
|
||||
fclose(new_file) == EOF)
|
||||
err(1,"%s",new_filename);
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ ex_arr_search(size_t ex_count, const ex_t *ex_arr,
|
||||
size_t init_ex_idx)
|
||||
{
|
||||
assert(ex_arr && ex_count);
|
||||
const size_t last_ex_idx = ex_count - 1;
|
||||
const ssize_t last_ex_idx = ex_count - 1;
|
||||
assert(init_ex_idx <= ex_count);
|
||||
assert(pos < prefix_len_arr[last_ex_idx].total);
|
||||
if (init_ex_idx == ex_count)
|
||||
@@ -278,7 +278,7 @@ exfile_seek(void *cookie, off64_t *pos_p, int whence)
|
||||
/* Ensure that the target position is valid. Note that repositioning the
|
||||
* file right past the last extent is considered valid, in line with normal
|
||||
* seek behavior, although no write (nor read) can be performed there. */
|
||||
if (new_pos < 0 || new_pos > xf->total_ex_len)
|
||||
if (new_pos < 0 || new_pos > (off64_t)xf->total_ex_len)
|
||||
return -1;
|
||||
|
||||
if (new_pos != (off64_t)xf->curr_pos) {
|
||||
@@ -338,7 +338,7 @@ exfile_open(int fd, const char *path, const char *fopen_mode, ex_t *ex_arr,
|
||||
|
||||
/* Validate mode argument. */
|
||||
exfile_mode_t mode = EXFILE_MODE_MAX;
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < arraysize(fopen_mode_to_mode); i++)
|
||||
if (!strcmp(fopen_mode_to_mode[i].fopen_mode, fopen_mode)) {
|
||||
mode = fopen_mode_to_mode[i].mode;
|
||||
|
||||
Reference in new issue
Block a user