linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Nixdorf <johannes@nixdorf.dev>
To: XFS Development Team <linux-xfs@vger.kernel.org>
Cc: Johannes Nixdorf <johannes@nixdorf.dev>
Subject: [PATCH 0/2] xfsprogs: Fix compiling against musl libc
Date: Sat, 09 Aug 2025 19:13:06 +0200	[thread overview]
Message-ID: <20250809-musl-fixes-v1-0-d0958fffb1af@nixdorf.dev> (raw)

The musl libc statx interface is provided independently from the
kernel headers, so not all defines from the kernel header (here:
STATX__RESERVED) are exported, and checking linux/stat.h as in the
current configure test checking for newest additions to struct statx
will not provide a result that is consistent with the actual code
using the libc interface.

On Alpine Linux this is already fixed by providing the defines
OVERRIDE_SYSTEM_STATX and STATX__RESERVED manually instead of fixing
up the autodetection (OVERRIDE_SYSTEM_STATX) and providing a fallback
(STATX__RESERVED) [1].

[1]: https://gitlab.alpinelinux.org/alpine/aports/-/blob/8ff6aa1e459a75b66375f56269fce43ca2c2f9bf/main/xfsprogs/APKBUILD#L27

Signed-off-by: Johannes Nixdorf <johannes@nixdorf.dev>
---
Johannes Nixdorf (2):
      configure: Base NEED_INTERNAL_STATX on libc headers first
      libfrog: Define STATX__RESERVED if not provided by the system

 libfrog/statx.h       |  5 ++++-
 m4/package_libcdev.m4 | 10 +++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)
---
base-commit: 854665693e6770c0730c1354871f08d01be6a333
change-id: 20250809-musl-fixes-99160afadcdf

Best regards,
-- 
Johannes Nixdorf <johannes@nixdorf.dev>


             reply	other threads:[~2025-08-09 17:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-09 17:13 Johannes Nixdorf [this message]
2025-08-09 17:13 ` [PATCH 1/2] configure: Base NEED_INTERNAL_STATX on libc headers first Johannes Nixdorf
2025-08-11 10:42   ` Christoph Hellwig
2025-08-28  9:11   ` Petr Vaněk
2025-08-09 17:13 ` [PATCH 2/2] libfrog: Define STATX__RESERVED if not provided by the system Johannes Nixdorf
2025-08-11 10:43   ` Christoph Hellwig
2025-08-28  9:12   ` Petr Vaněk

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=20250809-musl-fixes-v1-0-d0958fffb1af@nixdorf.dev \
    --to=johannes@nixdorf.dev \
    --cc=linux-xfs@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).