summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2016-10-05 13:44:02 -0500
committerandroid-build-merger2016-10-05 13:44:02 -0500
commitc2b3b5fade7e0a8215c4bb85c090b8ee0df45551 (patch)
tree44562bccfd451b565461602a424d9840f853589b /libsparse
parent2ccb00f98ddde6c8d769af02bfb13c1b96624f47 (diff)
parentc9dc124e2fad4cb03cf2f782c7ca5c4faec99150 (diff)
downloadplatform-system-core-c2b3b5fade7e0a8215c4bb85c090b8ee0df45551.tar.gz
platform-system-core-c2b3b5fade7e0a8215c4bb85c090b8ee0df45551.tar.xz
platform-system-core-c2b3b5fade7e0a8215c4bb85c090b8ee0df45551.zip
Merge "Test for _WIN32 in instead of USE_MINGW." am: ec99158580 am: 2e7e065db9 am: 04819403d6
am: c9dc124e2f Change-Id: I2cfb73fc12da1bb6396bfdd8f638b9ce977f84bc
Diffstat (limited to 'libsparse')
-rw-r--r--libsparse/output_file.c6
-rw-r--r--libsparse/sparse_read.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/libsparse/output_file.c b/libsparse/output_file.c
index d2847367a..6578d99b8 100644
--- a/libsparse/output_file.c
+++ b/libsparse/output_file.c
@@ -34,7 +34,7 @@
34#include "sparse_crc32.h" 34#include "sparse_crc32.h"
35#include "sparse_format.h" 35#include "sparse_format.h"
36 36
37#ifndef USE_MINGW 37#ifndef _WIN32
38#include <sys/mman.h> 38#include <sys/mman.h>
39#define O_BINARY 0 39#define O_BINARY 0
40#else 40#else
@@ -705,7 +705,7 @@ int write_fd_chunk(struct output_file *out, unsigned int len,
705 aligned_diff = offset - aligned_offset; 705 aligned_diff = offset - aligned_offset;
706 buffer_size = len + aligned_diff; 706 buffer_size = len + aligned_diff;
707 707
708#ifndef USE_MINGW 708#ifndef _WIN32
709 char *data = mmap64(NULL, buffer_size, PROT_READ, MAP_SHARED, fd, 709 char *data = mmap64(NULL, buffer_size, PROT_READ, MAP_SHARED, fd,
710 aligned_offset); 710 aligned_offset);
711 if (data == MAP_FAILED) { 711 if (data == MAP_FAILED) {
@@ -733,7 +733,7 @@ int write_fd_chunk(struct output_file *out, unsigned int len,
733 733
734 ret = out->sparse_ops->write_data_chunk(out, len, ptr); 734 ret = out->sparse_ops->write_data_chunk(out, len, ptr);
735 735
736#ifndef USE_MINGW 736#ifndef _WIN32
737 munmap(data, buffer_size); 737 munmap(data, buffer_size);
738#else 738#else
739 free(data); 739 free(data);
diff --git a/libsparse/sparse_read.c b/libsparse/sparse_read.c
index dbb4daba6..a18820277 100644
--- a/libsparse/sparse_read.c
+++ b/libsparse/sparse_read.c
@@ -79,7 +79,7 @@ static void verbose_error(bool verbose, int err, const char *fmt, ...)
79 s = " at "; 79 s = " at ";
80 } 80 }
81 if (verbose) { 81 if (verbose) {
82#ifndef USE_MINGW 82#ifndef _WIN32
83 if (err == -EOVERFLOW) { 83 if (err == -EOVERFLOW) {
84 sparse_print_verbose("EOF while reading file%s%s\n", s, at); 84 sparse_print_verbose("EOF while reading file%s%s\n", s, at);
85 } else 85 } else