[systemd-devel] [PATCH] make sure __NR_name_to_handle_at is correctly defined

Michael Olbrich m.olbrich at pengutronix.de
Thu Oct 18 04:55:13 PDT 2012


341 is only valid for x86, so don't use it for other architectures.
Add the correct numbers for ARM and PowerPC while at it.
---
 src/shared/missing.h |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/shared/missing.h b/src/shared/missing.h
index 1a31066..1965319 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -212,10 +212,22 @@ static inline pid_t gettid(void) {
 #  ifndef __NR_name_to_handle_at
 #    define __NR_name_to_handle_at 303
 #  endif
-#else
+#elif __i386__
 #  ifndef __NR_name_to_handle_at
 #    define __NR_name_to_handle_at 341
 #  endif
+#elif defined __arm__
+#  ifndef __NR_name_to_handle_at
+#    define __NR_name_to_handle_at 370
+#  endif
+#elif defined __powerpc__
+#  ifndef __NR_name_to_handle_at
+#    define __NR_name_to_handle_at 345
+#  endif
+#else
+#  ifndef __NR_name_to_handle_at
+#    error __NR_name_to_handle_at is not defined
+#  endif
 #endif
 
 #if !HAVE_DECL_NAME_TO_HANDLE_AT
-- 
1.7.10.4



More information about the systemd-devel mailing list