[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251110144232.3765169-1-nogunix@gmail.com>
Date: Mon, 10 Nov 2025 23:42:30 +0900
From: Masaharu Noguchi <nogunix@...il.com>
To: Jeff Layton <jlayton@...nel.org>,
Chuck Lever <chuck.lever@...cle.com>
Cc: Jesper Juhl <jesperjuhl76@...il.com>,
David Laight <david.laight.linux@...il.com>,
Alexander Aring <alex.aring@...il.com>,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
Masaharu Noguchi <nogunix@...il.com>
Subject: [PATCH v2 0/2] uapi/samples: guard renameat2 flag macros
Including `<linux/fcntl.h>` after libc headers leaves the renameat2 flag
macros stuck with libc's values, and our sample code in turn redefines
them when it includes the uapi header. This little series makes the
uapi header resilient to prior definitions and ensures the sample drops
any libc remnants before pulling in the kernel constants.
Changes since v1 (based on feedback from David Laight):
- uapi change now checks the macro values and undefines mismatches
- sample code always undefines the macros up front and documents why
Link: https://lore.kernel.org/all/20251109071304.2415982-1-nogunix@gmail.com/
Masaharu Noguchi (2):
uapi: fcntl: guard AT_RENAME_* aliases
samples: vfs: avoid libc AT_RENAME_* redefinitions
include/uapi/linux/fcntl.h | 15 ++++++++++++++-
samples/vfs/test-statx.c | 9 +++++++++
2 files changed, 23 insertions(+), 1 deletion(-)
base-commit: e9a6fb0bcdd7609be6969112f3fbfcce3b1d4a7c
--
2.51.1
Powered by blists - more mailing lists