Skip to content

musl: fix CPU_SETSIZE #4439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4795,7 +4795,9 @@ fn test_linux(target: &str) {
(struct_ == "statvfs" && field == "__f_spare") ||
(struct_ == "statvfs64" && field == "__f_spare") ||
// the `xsk_tx_metadata_union` field is an anonymous union
(struct_ == "xsk_tx_metadata" && field == "xsk_tx_metadata_union")
(struct_ == "xsk_tx_metadata" && field == "xsk_tx_metadata_union") ||
// FIXME(musl): After musl 1.2.0, the type becomes `int` instead of `long`.
(struct_ == "utmpx" && field == "ut_session")
});

cfg.skip_roundtrip(move |s| match s {
Expand Down
3 changes: 0 additions & 3 deletions src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,9 +731,6 @@ pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4;

#[cfg(not(target_arch = "loongarch64"))]
pub const CPU_SETSIZE: c_int = 128;
#[cfg(target_arch = "loongarch64")]
pub const CPU_SETSIZE: c_int = 1024;

pub const PTRACE_TRACEME: c_int = 0;
Expand Down
Loading