[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKuedOXEIapocQ8l@casper.infradead.org>
Date: Mon, 25 Aug 2025 00:21:24 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: linux-kernel@...r.kernel.org, Amir Goldstein <amir73il@...il.com>,
Jeff Layton <jlayton@...nel.org>,
Chuck Lever <chuck.lever@...cle.com>,
Alexander Aring <alex.aring@...il.com>,
Josef Bacik <josef@...icpanda.com>,
Aleksa Sarai <cyphar@...har.com>, Jan Kara <jack@...e.cz>,
Christian Brauner <brauner@...nel.org>,
linux-fsdevel@...r.kernel.org, linux-api@...r.kernel.org
Subject: Re: [PATCH] uapi/fcntl: conditionally define AT_RENAME* macros
On Sun, Aug 24, 2025 at 03:10:55PM -0700, Randy Dunlap wrote:
> Don't define the AT_RENAME_* macros when __USE_GNU is defined since
> /usr/include/stdio.h defines them in that case (i.e. when _GNU_SOURCE
> is defined, which causes __USE_GNU to be defined).
>
> Having them defined in 2 places causes build warnings (duplicate
> definitions) in both samples/watch_queue/watch_test.c and
> samples/vfs/test-statx.c.
It does? What flags?
#define AT_RENAME_NOREPLACE 0x0001
#define AT_RENAME_NOREPLACE 0x0001
int main(void)
{
return AT_RENAME_NOREPLACE;
}
gcc -W -Wall testA.c -o testA
(no warnings)
I'm pretty sure C says that duplicate definitions are fine as long
as they're identical.
Powered by blists - more mailing lists