summaryrefslogtreecommitdiff
path: root/fastboot/fastboot.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-10-19 16:09:39 -0700
committerElliott Hughes <enh@google.com>2018-10-23 13:20:49 -0700
commite8f4b14301e697e0cc54754b1837ce106f08e304 (patch)
tree9bdb3a9d843e532a3b1a4882859c6d51ec55ebd9 /fastboot/fastboot.cpp
parent7a08c896dda54b1814a2c7f06e45fff3de98ecdc (diff)
Add a simple MappedFile to libbase and switch fastboot and libziparchive over.
This allows us to remove libziparchive's dependency on libutils. Bug: http://b/79112958 Test: ran libbase and libziparchive tests, ran fastboot manually Change-Id: I95c651976dad222863e5b8c37d4514b778f5dce7
Diffstat (limited to 'fastboot/fastboot.cpp')
-rw-r--r--fastboot/fastboot.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index 6b6e659c6..925cac430 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -79,8 +79,8 @@ using android::base::Split;
using android::base::Trim;
using android::base::unique_fd;
-#ifndef O_BINARY
-#define O_BINARY 0
+#if defined(_WIN32)
+#define O_CLOEXEC O_NOINHERIT
#endif
static const char* serial = nullptr;