cygwin: fix cpuset_t typo in CPU_ZERO#5098
Merged
Merged
Conversation
CPU_ZERO at src/unix/cygwin/mod.rs:1712 declares its parameter as
&mut cpuset_t, but no type by that name exists in the cygwin
module. The struct is cpu_set_t (defined at line 91), and every
sibling function (CPU_SET, CPU_CLR, CPU_ISSET, CPU_COUNT,
CPU_COUNT_S, CPU_EQUAL) correctly uses cpu_set_t. The typo
prevents the cygwin module from compiling on x86_64-pc-cygwin:
error[E0425]: cannot find type `cpuset_t` in this scope
--> src/unix/cygwin/mod.rs:1712:34
|
1712 | pub fn CPU_ZERO(cpuset: &mut cpuset_t) -> () {
| ^^^^^^^^
After this fix, libc and libc-test build cleanly for
x86_64-pc-cygwin and the full libc-test suite passes (2968 ctest
cases, all other targets green).
3 tasks
Contributor
Author
JohnTitor
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
CPU_ZEROinsrc/unix/cygwin/mod.rs:1712declares its parameter as&mut cpuset_t, but no type by that name exists in the cygwin module. The struct iscpu_set_t(defined at line 91), and every sibling function (CPU_SET,CPU_CLR,CPU_ISSET,CPU_COUNT,CPU_COUNT_S,CPU_EQUAL) correctly usescpu_set_t.The typo prevents the cygwin module from compiling on
x86_64-pc-cygwin:Sources
Internal — typo in this crate. The
cpu_set_tstruct is the only definition; no upstream header reference needed.Checklist
libc-test/semverhave been updated — N/A; not adding/removing symbols.*LASTor*MAXare includedmain,cargo test --target x86_64-pc-cygwinbuilds and passes the full suite (2968 ctest cases, all other suites green).@rustbot label +stable-nominated