summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2019-05-02 18:56:40 -0700
committerShentubot <shentubot@google.com>2019-05-02 18:57:58 -0700
commitbf40fa21292f08e66a274169ad1318e62fbc542b (patch)
tree5a5cd79f41b636f661892314de0068c4c4468221 /test/syscalls/linux
parentbbb65391143d48a4781e48d0875897a857a69d67 (diff)
Replace dynamic macros with constants in memfd test.
PiperOrigin-RevId: 246433167 Change-Id: Idb9b6c20ee1da193176288dfd2f9d85ec0e69c54
Diffstat (limited to 'test/syscalls/linux')
-rw-r--r--test/syscalls/linux/memfd.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/syscalls/linux/memfd.cc b/test/syscalls/linux/memfd.cc
index 7e103124b..3494bcd13 100644
--- a/test/syscalls/linux/memfd.cc
+++ b/test/syscalls/linux/memfd.cc
@@ -38,8 +38,15 @@ namespace {
// The header sys/memfd.h isn't available on all systems, so redefining some of
// the constants here.
#define F_LINUX_SPECIFIC_BASE 1024
+
+#ifndef F_ADD_SEALS
#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
+#endif /* F_ADD_SEALS */
+
+#ifndef F_GET_SEALS
#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
+#endif /* F_GET_SEALS */
+
#define F_SEAL_SEAL 0x0001
#define F_SEAL_SHRINK 0x0002
#define F_SEAL_GROW 0x0004