summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2017-05-16 13:06:07 -0500
committerandroid-build-merger2017-05-16 13:06:07 -0500
commit32d5160e2369b351a8ef12ffec7a3d9dea560a0c (patch)
tree88b52a2ef1c8c8a4193aef39dd56fdcac8165180
parent4cc651974163a661a150785bd80ce6c1fdbf4559 (diff)
parent97caf43fbc30e15ad56013a3048ac90a79b5032d (diff)
downloadplatform-system-core-32d5160e2369b351a8ef12ffec7a3d9dea560a0c.tar.gz
platform-system-core-32d5160e2369b351a8ef12ffec7a3d9dea560a0c.tar.xz
platform-system-core-32d5160e2369b351a8ef12ffec7a3d9dea560a0c.zip
Merge "Remove libbase's trivial libutils-headers dependency." am: 337b4dd661 am: 70b0e94f80
am: 97caf43fbc Change-Id: I130d4c518160d7d30353b8ca8c62339440b9ac6d
-rw-r--r--base/Android.bp1
-rw-r--r--base/file.cpp5
2 files changed, 3 insertions, 3 deletions
diff --git a/base/Android.bp b/base/Android.bp
index 81b96db43..b636dc31c 100644
--- a/base/Android.bp
+++ b/base/Android.bp
@@ -53,7 +53,6 @@ cc_library {
53 53
54 header_libs: [ 54 header_libs: [
55 "libbase_headers", 55 "libbase_headers",
56 "libutils_headers",
57 ], 56 ],
58 export_header_lib_headers: ["libbase_headers"], 57 export_header_lib_headers: ["libbase_headers"],
59 58
diff --git a/base/file.cpp b/base/file.cpp
index 7fbebc538..a2f28878e 100644
--- a/base/file.cpp
+++ b/base/file.cpp
@@ -32,13 +32,14 @@
32#include "android-base/macros.h" // For TEMP_FAILURE_RETRY on Darwin. 32#include "android-base/macros.h" // For TEMP_FAILURE_RETRY on Darwin.
33#include "android-base/unique_fd.h" 33#include "android-base/unique_fd.h"
34#include "android-base/utf8.h" 34#include "android-base/utf8.h"
35#include "utils/Compat.h"
36 35
37#if defined(__APPLE__) 36#if defined(__APPLE__)
38#include <mach-o/dyld.h> 37#include <mach-o/dyld.h>
39#endif 38#endif
40#if defined(_WIN32) 39#if defined(_WIN32)
41#include <windows.h> 40#include <windows.h>
41#define O_CLOEXEC O_NOINHERIT
42#define O_NOFOLLOW 0
42#endif 43#endif
43 44
44namespace android { 45namespace android {
@@ -133,7 +134,7 @@ bool WriteStringToFile(const std::string& content, const std::string& path,
133 bool follow_symlinks) { 134 bool follow_symlinks) {
134 int flags = O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_BINARY | 135 int flags = O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_BINARY |
135 (follow_symlinks ? 0 : O_NOFOLLOW); 136 (follow_symlinks ? 0 : O_NOFOLLOW);
136 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(path.c_str(), flags, DEFFILEMODE))); 137 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(path.c_str(), flags, 0666)));
137 if (fd == -1) { 138 if (fd == -1) {
138 return false; 139 return false;
139 } 140 }