generic: fix statx definition for non-x86 architecture
authorGwendal Grignou <gwendal@chromium.org>
Wed, 19 Apr 2017 23:54:53 +0000 (16:54 -0700)
committerEryu Guan <eguan@redhat.com>
Fri, 21 Apr 2017 03:14:34 +0000 (11:14 +0800)
Fix a compilation error for ARM:
__ILP32__ is defined but not __X32_SYSCALL_BIT.

The check should only apply for x86_64 architecture, statx for other
architectures is not implemented yet - see commit 7acc839c9e57
"statx: Add a system call to make enhanced file info available".

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
src/statx.h

index b491c018166651c4bdc724f1c9203691a3bb7dc5..5d58208a94e6de4e3497ba97b5c12d4d9300b165 100644 (file)
 #ifndef __NR_statx
 # ifdef __i386__
 #  define __NR_statx 383
-# elif defined (__ILP32__)
-#  define __NR_statx (__X32_SYSCALL_BIT + 332)
 # elif defined(__x86_64__)
-#  define __NR_statx 332
+#  if defined (__ILP32__)
+#   define __NR_statx (__X32_SYSCALL_BIT + 332)
+#  else
+#   define __NR_statx 332
+#  endif
 # endif
 #endif