Skip to content

Conversation

Gelbpunkt
Copy link
Contributor

Description

musl has its own definition of the fanotify_event_metadata struct and doesn't use the one from the Linux kernel.

The difference here is that musl's mask field has the type unsigned long long, while the kernel uses __u64.

This currently causes libc-test to fail to compile on musl targets.

Sources

Linux: https://github.com/torvalds/linux/blob/master/include/uapi/linux/fanotify.h#L143
musl: https://git.musl-libc.org/cgit/musl/tree/include/sys/fanotify.h#n15

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

musl has its own definition of the fanotify_event_metadata
struct and doesn't use the one from the Linux kernel.

The difference here is that musl's mask field has the type
unsigned long long, while the kernel uses __u64.

This currently causes libc-test to fail to compile on musl targets.

Linux: https://github.com/torvalds/linux/blob/master/include/uapi/linux/fanotify.h#L143
musl: https://git.musl-libc.org/cgit/musl/tree/include/sys/fanotify.h#n15

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
@Gelbpunkt Gelbpunkt force-pushed the fanotify-event-metadata-musl branch from ae814fc to 7559ba1 Compare July 2, 2025 08:04
@Gelbpunkt Gelbpunkt requested a review from tgross35 July 2, 2025 08:05
Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tgross35 tgross35 enabled auto-merge July 2, 2025 08:08
@tgross35 tgross35 added this pull request to the merge queue Jul 2, 2025
Merged via the queue into rust-lang:main with commit a883b79 Jul 2, 2025
50 of 51 checks passed
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jul 8, 2025
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Jul 29, 2025
musl has its own definition of the fanotify_event_metadata
struct and doesn't use the one from the Linux kernel.

The difference here is that musl's mask field has the type
unsigned long long, while the kernel uses __u64.

This currently causes libc-test to fail to compile on musl targets.

Linux: https://github.com/torvalds/linux/blob/master/include/uapi/linux/fanotify.h#L143
musl: https://git.musl-libc.org/cgit/musl/tree/include/sys/fanotify.h#n15

Signed-off-by: Jens Reidel <adrian@travitia.xyz>

(backport <rust-lang#4510>)
(cherry picked from commit 7559ba1)
@tgross35 tgross35 mentioned this pull request Jul 29, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jul 29, 2025
musl has its own definition of the fanotify_event_metadata
struct and doesn't use the one from the Linux kernel.

The difference here is that musl's mask field has the type
unsigned long long, while the kernel uses __u64.

This currently causes libc-test to fail to compile on musl targets.

Linux: https://github.com/torvalds/linux/blob/master/include/uapi/linux/fanotify.h#L143
musl: https://git.musl-libc.org/cgit/musl/tree/include/sys/fanotify.h#n15

Signed-off-by: Jens Reidel <adrian@travitia.xyz>

(backport <#4510>)
(cherry picked from commit 7559ba1)
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-linux O-musl O-unix stable-applied This PR has been cherry-picked to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants