summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-10-29 17:07:47 +0100
committerLennart Poettering <lennart@poettering.net>2014-10-29 17:07:47 +0100
commitb244d9f374d607abfb24489593b4b7b6ce716cd4 (patch)
tree59307069fe71bf37c2ecab2e68b1c694e45af17e
parent539618a0ddc2dc7f0fbe28de2ae0e07b34c81e60 (diff)
missing: simplify memfd ifdeffery
-rw-r--r--src/shared/missing.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/shared/missing.h b/src/shared/missing.h
index 5b87e23eec..0cfb6fa4c3 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -115,21 +115,15 @@ static inline int pivot_root(const char *new_root, const char *put_old) {
}
#endif
-#ifdef __x86_64__
-# ifndef __NR_memfd_create
+#ifndef __NR_memfd_create
+# if defined __x86_64__
# define __NR_memfd_create 319
-# endif
-#elif defined __arm__
-# ifndef __NR_memfd_create
+# elif defined __arm__
# define __NR_memfd_create 385
-# endif
-#elif defined _MIPS_SIM
-# ifndef __NR_memfd_create
+# elif defined _MIPS_SIM
# warning "__NR_memfd_create not yet defined for MIPS"
# define __NR_memfd_create 0xffffffff
-# endif
-#else
-# ifndef __NR_memfd_create
+# else
# define __NR_memfd_create 356
# endif
#endif