summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yurii Zubrytskyi <zyy@google.com> 2022-12-01 09:34:02 -0800
committer Yurii Zubrytskyi <zyy@google.com> 2022-12-01 09:34:02 -0800
commit98e12d0d782fa11e2ded0d999c349d08428dff0f (patch)
treee8944429fedcda4670801903c7941c9c908da69b
parent3d0a6c17f458e77063c6cf49e0bde2da202abd8d (diff)
Mac build break: remove include that's not there
isReadonlyFilesystem() only matters for the code running on the deivces, disable its implementation on Windows and Mac Bug: 260973096 Test: build Change-Id: Idefe4c874003cdaeb9fc212a71efc3fa266f2fcc
-rw-r--r--libs/androidfw/misc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/androidfw/misc.cpp b/libs/androidfw/misc.cpp
index 7af506638ebc..d3949e9cf69f 100644
--- a/libs/androidfw/misc.cpp
+++ b/libs/androidfw/misc.cpp
@@ -23,10 +23,10 @@
#include "android-base/logging.h"
-#ifndef _WIN32
+#ifdef __linux__
#include <sys/statvfs.h>
#include <sys/vfs.h>
-#endif // _WIN32
+#endif // __linux__
#include <cstring>
#include <cstdio>
@@ -86,15 +86,15 @@ time_t getFileModDate(const char* fileName)
return sb.st_mtime;
}
-#ifdef _WIN32
-// No need to implement these for Windows, the functions only matter on a device.
+#ifndef __linux__
+// No need to implement these on the host, the functions only matter on a device.
bool isReadonlyFilesystem(const char*) {
return false;
}
bool isReadonlyFilesystem(int) {
return false;
}
-#else // _WIN32
+#else // __linux__
bool isReadonlyFilesystem(const char* path) {
struct statfs sfs;
if (::statfs(path, &sfs)) {
@@ -112,6 +112,6 @@ bool isReadonlyFilesystem(int fd) {
}
return (sfs.f_flags & ST_RDONLY) != 0;
}
-#endif // _WIN32
+#endif // __linux__
}; // namespace android