Re: [PATCH] uapi/fcntl: conditionally define AT_RENAME* macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux