summaryrefslogtreecommitdiff
path: root/libcutils
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2023-09-23 02:20:43 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-09-23 02:20:43 +0000
commit7318616f3a0decf51d1fcedb84f7b0681cc3578e (patch)
treeb2c2825be470dfeb6e0db4f352a4c15c76ead70c /libcutils
parentcad272e1e427721d25f6e3dd2c12805f27420350 (diff)
parentc358a91207040f5c9504b5791b124c5ee90047a1 (diff)
downloadcore-7318616f3a0decf51d1fcedb84f7b0681cc3578e.tar.gz
Merge "Remove Windows workaround in file not built for Windows." into main am: d091aa44b3 am: 503121ccea am: c1342bc826 am: 00f9682031 am: c358a91207
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2760267 Change-Id: I21d5323b5949195da985bddd8b868045dded6f9a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libcutils')
-rw-r--r--libcutils/fs_config.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/libcutils/fs_config.cpp b/libcutils/fs_config.cpp
index 26ac57607..919be2ff2 100644
--- a/libcutils/fs_config.cpp
+++ b/libcutils/fs_config.cpp
@@ -41,10 +41,6 @@
#include "fs_config.h"
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
using android::base::EndsWith;
using android::base::StartsWith;
@@ -257,12 +253,12 @@ static int fs_config_open(int dir, int which, const char* target_out_path) {
len = strip(target_out_path, len, "/");
len = strip(target_out_path, len, "/system");
if (asprintf(&name, "%.*s%s", (int)len, target_out_path, conf[which][dir]) != -1) {
- fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_BINARY));
+ fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY));
free(name);
}
}
if (fd < 0) {
- fd = TEMP_FAILURE_RETRY(open(conf[which][dir], O_RDONLY | O_BINARY));
+ fd = TEMP_FAILURE_RETRY(open(conf[which][dir], O_RDONLY));
}
return fd;
}