From f6a84e4462c8425869093f26f7e83bc1cb24ee70 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 22 Sep 2023 14:37:37 +0000 Subject: [PATCH] Remove Windows workaround in file not built for Windows. Test: treehugger Change-Id: I311cfbc9245cbe90ed6fc4fa379ff5b9abdf21e7 --- libcutils/fs_config.cpp | 8 ++------ 1 file 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; }