From: David Laight <david.laight.linux@gmail.com>
To: Masaharu Noguchi <nogunix@gmail.com>
Cc: jesperjuhl76@gmail.com, Jeff Layton <jlayton@kernel.org>,
Chuck Lever <chuck.lever@oracle.com>,
Alexander Aring <alex.aring@gmail.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] samples: vfs: avoid libc AT_RENAME_* redefinitions
Date: Sun, 9 Nov 2025 16:04:19 +0000 [thread overview]
Message-ID: <20251109160419.5a16411a@pumpkin> (raw)
In-Reply-To: <20251109071304.2415982-3-nogunix@gmail.com>
On Sun, 9 Nov 2025 16:13:04 +0900
Masaharu Noguchi <nogunix@gmail.com> wrote:
> Signed-off-by: Masaharu Noguchi <nogunix@gmail.com>
> ---
> samples/vfs/test-statx.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/samples/vfs/test-statx.c b/samples/vfs/test-statx.c
> index 49c7a46cee07..eabea80e9db8 100644
> --- a/samples/vfs/test-statx.c
> +++ b/samples/vfs/test-statx.c
> @@ -20,6 +20,15 @@
> #include <sys/syscall.h>
> #include <sys/types.h>
> #include <linux/stat.h>
> +#ifdef AT_RENAME_NOREPLACE
> +#undef AT_RENAME_NOREPLACE
> +#endif
> +#ifdef AT_RENAME_EXCHANGE
> +#undef AT_RENAME_EXCHANGE
> +#endif
> +#ifdef AT_RENAME_WHITEOUT
> +#undef AT_RENAME_WHITEOUT
> +#endif
There is no need for the #if, just #undef the symbols.
It is probably worthy of a short comment.
David
> #include <linux/fcntl.h>
> #define statx foo
> #define statx_timestamp foo_timestamp
prev parent reply other threads:[~2025-11-09 16:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAHaCkme7C8LDpWVX8TnDQQ+feWeQy_SA3HYfpyyPNFee_+Z2EA@mail.gmail.com>
2025-11-09 7:13 ` [PATCH 0/2] fix AT_RENAME_* redefinitions with glibc < 2.43 Masaharu Noguchi
2025-11-09 7:13 ` [PATCH 1/2] uapi: fcntl: guard AT_RENAME_* aliases Masaharu Noguchi
2025-11-09 16:13 ` David Laight
2025-11-09 7:13 ` [PATCH 2/2] samples: vfs: avoid libc AT_RENAME_* redefinitions Masaharu Noguchi
2025-11-09 16:04 ` David Laight [this message]
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=20251109160419.5a16411a@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=alex.aring@gmail.com \
--cc=chuck.lever@oracle.com \
--cc=jesperjuhl76@gmail.com \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nogunix@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).