summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-21 03:07:42 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-21 03:07:42 +0100
commit6633045578722be838ba5e40632379f79e5f4954 (patch)
treee31a7cfd8a8364d02fa89171c821053e1e0d41ac /src/shared
parentbuild-sys: Add setns() functions if not in the C library. (diff)
downloadsystemd-6633045578722be838ba5e40632379f79e5f4954.tar.xz
systemd-6633045578722be838ba5e40632379f79e5f4954.zip
missing: simplifications
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/missing.h24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/shared/missing.h b/src/shared/missing.h
index 3142306e35..06c69dac8e 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -273,25 +273,17 @@ static inline pid_t gettid(void) {
#define MAX_HANDLE_SZ 128
#endif
-#if defined __x86_64__
-# ifndef __NR_name_to_handle_at
+#ifndef __NR_name_to_handle_at
+# if defined(__x86_64__)
# define __NR_name_to_handle_at 303
-# endif
-#elif defined __i386__
-# ifndef __NR_name_to_handle_at
+# elif defined(__i386__)
# define __NR_name_to_handle_at 341
-# endif
-#elif defined __arm__
-# ifndef __NR_name_to_handle_at
+# elif defined(__arm__)
# define __NR_name_to_handle_at 370
-# endif
-#elif defined __powerpc__
-# ifndef __NR_name_to_handle_at
+# elif defined(__powerpc__)
# define __NR_name_to_handle_at 345
-# endif
-#else
-# ifndef __NR_name_to_handle_at
-# error __NR_name_to_handle_at is not defined
+# else
+# error "__NR_name_to_handle_at is not defined"
# endif
#endif
@@ -311,7 +303,7 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle
# ifdef HAVE___SECURE_GETENV
# define secure_getenv __secure_getenv
# else
-# error neither secure_getenv nor __secure_getenv are available
+# error "neither secure_getenv nor __secure_getenv are available"
# endif
#endif