diff options
author | Tamir Duberstein <tamird@google.com> | 2020-08-31 13:08:49 -0700 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2020-09-09 17:53:10 -0700 |
commit | bdabd100d340d9ff88e65f31930e1f31800811f5 (patch) | |
tree | 3d3b604b73615494be210c1e0f13ac03d4f3274b /test/util | |
parent | 1b879d8276c39dca6a43b656df9224e21b8b80e1 (diff) |
Remove __fuchsia__ defines
These mostly guard linux-only headers; check for linux instead.
PiperOrigin-RevId: 329362762
Diffstat (limited to 'test/util')
-rw-r--r-- | test/util/fs_util.cc | 8 | ||||
-rw-r--r-- | test/util/fs_util.h | 4 | ||||
-rw-r--r-- | test/util/test_util_runfiles.cc | 4 |
3 files changed, 6 insertions, 10 deletions
diff --git a/test/util/fs_util.cc b/test/util/fs_util.cc index dffa16183..572675622 100644 --- a/test/util/fs_util.cc +++ b/test/util/fs_util.cc @@ -15,9 +15,9 @@ #include "test/util/fs_util.h" #include <dirent.h> -#ifndef __fuchsia__ +#ifdef __linux__ #include <linux/magic.h> -#endif // __fuchsia__ +#endif // __linux__ #include <sys/stat.h> #include <sys/statfs.h> #include <sys/types.h> @@ -633,7 +633,7 @@ PosixErrorOr<std::string> ProcessExePath(int pid) { return ReadLink(absl::StrCat("/proc/", pid, "/exe")); } -#ifndef __fuchsia__ +#ifdef __linux__ PosixErrorOr<bool> IsTmpfs(const std::string& path) { struct statfs stat; if (statfs(path.c_str(), &stat)) { @@ -647,7 +647,7 @@ PosixErrorOr<bool> IsTmpfs(const std::string& path) { } return stat.f_type == TMPFS_MAGIC; } -#endif // __fuchsia__ +#endif // __linux__ } // namespace testing } // namespace gvisor diff --git a/test/util/fs_util.h b/test/util/fs_util.h index 044190657..314637de0 100644 --- a/test/util/fs_util.h +++ b/test/util/fs_util.h @@ -179,10 +179,10 @@ std::string CleanPath(absl::string_view path); // Returns the full path to the executable of the given pid or a PosixError. PosixErrorOr<std::string> ProcessExePath(int pid); -#ifndef __fuchsia__ +#ifdef __linux__ // IsTmpfs returns true if the file at path is backed by tmpfs. PosixErrorOr<bool> IsTmpfs(const std::string& path); -#endif // __fucshia__ +#endif // __linux__ namespace internal { // Not part of the public API. diff --git a/test/util/test_util_runfiles.cc b/test/util/test_util_runfiles.cc index 694d21692..7210094eb 100644 --- a/test/util/test_util_runfiles.cc +++ b/test/util/test_util_runfiles.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef __fuchsia__ - #include <iostream> #include <string> @@ -46,5 +44,3 @@ std::string RunfilePath(std::string path) { } // namespace testing } // namespace gvisor - -#endif // __fuchsia__ |