From nobody Fri Oct 3 20:58:19 2025 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CA8021ABB1; Sun, 24 Aug 2025 22:10:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756073460; cv=none; b=l9/+wTabTZXsELcu5bgjz3vp2i5PTeBgFtlv1kBMCQmgYdA5PMsZi8B3MFKcdEbranJDctaqIPM6ew2F6F8OpWbzADI2VdXeJM8OGp0nnQkV5lQn3ised7hcGfwF/o9qXhTbzJXe6zZNZxqEpQDxfTzWvjAu0jhUekQbcwbbGRQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756073460; c=relaxed/simple; bh=F2I8ehYbuOZkroeVyTJBplw4uA0f86+T2vgg5gXzd4M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EAUuuniBjSTb+LKR+1UQQ5Ah9czbeEW+pmI8EQmHdnwTyK8tcXDzPEpTlrEQCDiSxO6Ocgx7P6/ZPeYEizlvMeliNT3icHTqmcZJ4zDfqxgFEuOk+YZ8/cm/OyOWtajHSBBkU9WtkwukkUNd71vbLs3LCUZShXjWlnSo6BAncRU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=HynLNXxe; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="HynLNXxe" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=zOkyzVYHPHDLXgXeS6e7XGbTKHi06uVL/QHgq6g0IY8=; b=HynLNXxe/bZhVm0/0FOqHqQl5q JZx5GKNa/J7ryvKZEtWykMeS3U9D5YlJVRfuYBDaf7HpC7t2xcnB1aeAozOEqP0JNIYNdBwdIE6M5 QcCid2oqWIDYHMYz7w2/UV4IqVeKtsqnc9U2JXkNKGT68E2gX6fF1Uq5ize+iziXCH8NSOPPacasK mm+xmLgTCt6DVAamypIofiCepPqNq9XfB9riS/LaXsfFBfFC8iGu7EyytjUqJdMLHia8j4bH9GtI0 79IkRSmlytTH+1dTsUH8GVzU3W6uOGTqnBSfgDy48FuCS1+ixhZ5wXsAtd9fH+W6/ONhSG/j336kl 3orhoxbA==; Received: from [50.53.25.54] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1uqIvQ-00000006aHc-1oZn; Sun, 24 Aug 2025 22:10:56 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Amir Goldstein , Jeff Layton , Chuck Lever , Alexander Aring , Josef Bacik , Aleksa Sarai , Jan Kara , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org Subject: [PATCH] uapi/fcntl: conditionally define AT_RENAME* macros Date: Sun, 24 Aug 2025 15:10:55 -0700 Message-ID: <20250824221055.86110-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Fixes: b4fef22c2fb9 ("uapi: explain how per-syscall AT_* flags should be al= located") Signed-off-by: Randy Dunlap --- Cc: Amir Goldstein Cc: Jeff Layton Cc: Chuck Lever Cc: Alexander Aring Cc: Josef Bacik Cc: Aleksa Sarai Cc: Jan Kara Cc: Christian Brauner Cc: linux-fsdevel@vger.kernel.org CC: linux-api@vger.kernel.org include/uapi/linux/fcntl.h | 2 ++ 1 file changed, 2 insertions(+) --- linux-next-20250819.orig/include/uapi/linux/fcntl.h +++ linux-next-20250819/include/uapi/linux/fcntl.h @@ -155,10 +155,12 @@ * as possible, so we can use them for generic bits in the future if neces= sary. */ =20 +#ifndef __USE_GNU /* Flags for renameat2(2) (must match legacy RENAME_* flags). */ #define AT_RENAME_NOREPLACE 0x0001 #define AT_RENAME_EXCHANGE 0x0002 #define AT_RENAME_WHITEOUT 0x0004 +#endif =20 /* Flag for faccessat(2). */ #define AT_EACCESS 0x200 /* Test access permitted for