summaryrefslogtreecommitdiffhomepage
path: root/test/util
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2020-01-30 14:56:50 -0800
committerKevin Krakauer <krakauer@google.com>2020-01-30 14:56:50 -0800
commit2142c70118a6f5ac3ca438a240525af4fa114f7f (patch)
treeccb6c86ef3b818e22fd57d12297ed4913a9d98dd /test/util
parentb615f94aeacb2c21bb59c8b44f303e7b7ca05ad6 (diff)
parent9988cf2eeff596ce519046d80c54d09166f7d84b (diff)
Merge branch 'master' into ipt-udp-matchers
Diffstat (limited to 'test/util')
-rw-r--r--test/util/fs_util.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/util/fs_util.h b/test/util/fs_util.h
index ee1b341d7..caf19b24d 100644
--- a/test/util/fs_util.h
+++ b/test/util/fs_util.h
@@ -26,6 +26,17 @@
namespace gvisor {
namespace testing {
+
+// O_LARGEFILE as defined by Linux. glibc tries to be clever by setting it to 0
+// because "it isn't needed", even though Linux can return it via F_GETFL.
+#if defined(__x86_64__)
+constexpr int kOLargeFile = 00100000;
+#elif defined(__aarch64__)
+constexpr int kOLargeFile = 00400000;
+#else
+#error "Unknown architecture"
+#endif
+
// Returns a status or the current working directory.
PosixErrorOr<std::string> GetCWD();