append2simg: write to temporary file
append2simg causes libsparse to write mmapped data from a file
back to that same file. On btrfs, this sometimes causes a page
of zeroes to be written instead of the file data. Work around
the issue by writing the output to a temporary file and then
renaming it over the original file.
Change-Id: Ia194b6ba0ddb8548747b63292b523756f544706a
diff --git a/libsparse/Android.mk b/libsparse/Android.mk
index a21e090..4aba168 100644
--- a/libsparse/Android.mk
+++ b/libsparse/Android.mk
@@ -81,6 +81,8 @@
include $(BUILD_EXECUTABLE)
+ifneq ($(HOST_OS),windows)
+
include $(CLEAR_VARS)
LOCAL_SRC_FILES := append2simg.c
LOCAL_MODULE := append2simg
@@ -89,6 +91,7 @@
libz
include $(BUILD_HOST_EXECUTABLE)
+endif
include $(CLEAR_VARS)
LOCAL_MODULE := simg_dump.py