summaryrefslogtreecommitdiffstats
path: root/applypatch
diff options
context:
space:
mode:
Diffstat (limited to 'applypatch')
-rw-r--r--applypatch/Android.mk9
-rw-r--r--applypatch/applypatch.c2
2 files changed, 8 insertions, 3 deletions
diff --git a/applypatch/Android.mk b/applypatch/Android.mk
index 4984093dd..eb3e4580e 100644
--- a/applypatch/Android.mk
+++ b/applypatch/Android.mk
@@ -13,8 +13,10 @@
# limitations under the License.
LOCAL_PATH := $(call my-dir)
+
include $(CLEAR_VARS)
+LOCAL_CLANG := true
LOCAL_SRC_FILES := applypatch.c bspatch.c freecache.c imgpatch.c utils.c
LOCAL_MODULE := libapplypatch
LOCAL_MODULE_TAGS := eng
@@ -25,28 +27,31 @@ include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
+LOCAL_CLANG := true
LOCAL_SRC_FILES := main.c
LOCAL_MODULE := applypatch
LOCAL_C_INCLUDES += bootable/recovery
LOCAL_STATIC_LIBRARIES += libapplypatch libmtdutils libmincrypt libbz
-LOCAL_SHARED_LIBRARIES += libz libcutils libstdc++ libc
+LOCAL_SHARED_LIBRARIES += libz libcutils libc
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
+LOCAL_CLANG := true
LOCAL_SRC_FILES := main.c
LOCAL_MODULE := applypatch_static
LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_MODULE_TAGS := eng
LOCAL_C_INCLUDES += bootable/recovery
LOCAL_STATIC_LIBRARIES += libapplypatch libmtdutils libmincrypt libbz
-LOCAL_STATIC_LIBRARIES += libz libcutils libstdc++ libc
+LOCAL_STATIC_LIBRARIES += libz libcutils libc
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
+LOCAL_CLANG := true
LOCAL_SRC_FILES := imgdiff.c utils.c bsdiff.c
LOCAL_MODULE := imgdiff
LOCAL_FORCE_STATIC_EXECUTABLE := true
diff --git a/applypatch/applypatch.c b/applypatch/applypatch.c
index 6f02a38ee..2358d4292 100644
--- a/applypatch/applypatch.c
+++ b/applypatch/applypatch.c
@@ -662,7 +662,7 @@ size_t FreeSpaceForFile(const char* filename) {
printf("failed to statfs %s: %s\n", filename, strerror(errno));
return -1;
}
- return sf.f_bsize * sf.f_bfree;
+ return sf.f_bsize * sf.f_bavail;
}
int CacheSizeCheck(size_t bytes) {