summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2016-10-05 11:37:18 -0500
committerElliott Hughes2016-10-05 11:37:44 -0500
commit34a4f0b8c75e2c5a347e04454423cf55c5406075 (patch)
tree9c4e7f6807ec36d74d010c2114ce916e9fe40323 /libsparse
parent093951a2307f6572f911883c1ae6d01996e872c2 (diff)
downloadplatform-system-core-34a4f0b8c75e2c5a347e04454423cf55c5406075.tar.gz
platform-system-core-34a4f0b8c75e2c5a347e04454423cf55c5406075.tar.xz
platform-system-core-34a4f0b8c75e2c5a347e04454423cf55c5406075.zip
Test for _WIN32 in instead of USE_MINGW.
Bug: http://b/23392815 Test: builds Change-Id: I7fce8de1f0e2314170cce456cd49346dcee9d134
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