All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gwendal Grignou <gwendal@chromium.org>
To: dhowells@redhat.com, eguan@redhat.com
Cc: fstests@vger.kernel.org
Subject: [PATCH] generic: fix statx definition for non-x86 architecture
Date: Wed, 19 Apr 2017 16:54:53 -0700	[thread overview]
Message-ID: <20170419235453.8237-1-gwendal@chromium.org> (raw)

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>
---
 src/statx.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/statx.h b/src/statx.h
index b491c018..5d58208a 100644
--- a/src/statx.h
+++ b/src/statx.h
@@ -19,10 +19,12 @@
 #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
 
-- 
2.12.2


             reply	other threads:[~2017-04-19 23:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 23:54 Gwendal Grignou [this message]
2017-04-20  0:27 ` [PATCH] generic: fix statx definition for non-x86 architecture Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170419235453.8237-1-gwendal@chromium.org \
    --to=gwendal@chromium.org \
    --cc=dhowells@redhat.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.