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

2012-10-19 Thread Zbigniew Jędrzejewski-Szmek
On 10/18/2012 01:55 PM, Michael Olbrich wrote:
> 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.
Applied (with fix).

Zbyszek


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2012-10-18 Thread Michael Olbrich
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

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel