Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

lib: fix building with musl libc #658

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Conversation

JustSoup312
Copy link

No major changes, just defines a const that is unavailable from the libc crate under musl.

libc does not provide STATX_ATTR_MOUNT_ROOT for the musl target as the integration for it has been slow at best. Various dependent projects have included this const manually until the libc crate itself fixes the issues with musl support.

This shouldn't change compilation on glibc-based distros as conditional-compilation is invoked.

No major changes, just defines a constant that is unavailable from the libc crate under musl.
@@ -7,12 +7,18 @@ use anyhow::Result;
use cap_std::fs::Dir;
use cap_std_ext::cap_std;

// Fix musl support
Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with this as is but probably the best place to fix this is adding the definitions into rustix

@cgwalters cgwalters merged commit 4d46d17 into ostreedev:main Aug 30, 2024
7 checks passed
@JustSoup312 JustSoup312 deleted the musl branch August 30, 2024 20:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants