linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masaharu Noguchi <nogunix@gmail.com>
To: jesperjuhl76@gmail.com, Jeff Layton <jlayton@kernel.org>,
	Chuck Lever <chuck.lever@oracle.com>
Cc: Alexander Aring <alex.aring@gmail.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Masaharu Noguchi <nogunix@gmail.com>
Subject: [PATCH 0/2] fix AT_RENAME_* redefinitions with glibc < 2.43
Date: Sun,  9 Nov 2025 16:13:02 +0900	[thread overview]
Message-ID: <20251109071304.2415982-1-nogunix@gmail.com> (raw)
In-Reply-To: <CAHaCkme7C8LDpWVX8TnDQQ+feWeQy_SA3HYfpyyPNFee_+Z2EA@mail.gmail.com>

LKML reports show that `allyesconfig` currently fails with glibc 2.42
because both `<stdio.h>` and `<linux/fcntl.h>` define the AT_RENAME_*
macros.  A follow-up pointed to glibc commit `1166170d9586 ("libio:
Define AT_RENAME_* with the same tokens as Linux")`, which will first
appear in glibc 2.43.  Until that release lands in common distributions,
upstream kernels still build against glibc versions that redeclare the
macros and fail under `-Werror`.

This series is a small, revertable workaround so developers on Fedora 43
(glibc 2.42) and other distributions with glibc < 2.43 can keep building
the samples.  The
first patch only emits the AT_RENAME_* aliases when libc does not do so
already, and the second patch undefines any libc-provided macros before
including `<linux/fcntl.h>` in the VFS sample.  Once glibc 2.43+ is
ubiquitous (or if we decide to remove the aliases entirely), these
changes can be dropped.

Link: https://lore.kernel.org/all/CAHaCkme7C8LDpWVX8TnDQQ+feWeQy_SA3HYfpyyPNFee_+Z2EA@mail.gmail.com/ # LKML report
Link: https://lore.kernel.org/all/20251013012423.GA331@ax162/ # follow-up
Link: https://sourceware.org/git/?p=glibc.git;a=commit;h=1166170d95863e5a6f8121a5ca9d97713f524f49 # glibc fix

Masaharu Noguchi (2):
  uapi: fcntl: guard AT_RENAME_* aliases
  samples: vfs: avoid libc AT_RENAME_* redefinitions

 include/uapi/linux/fcntl.h | 6 ++++++
 samples/vfs/test-statx.c   | 9 +++++++++
 2 files changed, 15 insertions(+)

-- 
2.51.1

       reply	other threads:[~2025-11-09  7:13 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 ` Masaharu Noguchi [this message]
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

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=20251109071304.2415982-1-nogunix@gmail.com \
    --to=nogunix@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 \
    /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).