Skip to content

Make fd_set fields public #37

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 1 commit into from
Closed

Conversation

sfackler
Copy link
Member

@sfackler sfackler commented Nov 4, 2015

Closes #36

@thibault-ml
Copy link

I had an issue when using fd_set because of private fields. I ended up having to use malloc, which has isn't great.

However, I don't believe the field should be public as it has private meanings.
Instead, libc should provide a new method or a initialiser function.

@alexcrichton
Copy link
Member

I'd be fine to merge something like this, but the CI builds are red unfortunately.

Note that in the meantime you can initialize an fd_set with mem::{uninitialized, zero} and then use the FD_* macros to manipulate them (as C would)

@alexcrichton
Copy link
Member

I think this needs some more work to move forward (e.g. rather than just making the fields public), so I'm going to close this for now. Feel free to resubmit if the definitions are updated though!

dlrobertson pushed a commit to dlrobertson/libc that referenced this pull request Oct 31, 2017
Use -unknown- instead of -elf-, to match Rust and be more standard
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Feb 22, 2025
Revert bump in the minimum supported Rust version
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Feb 22, 2025
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Apr 2, 2025
Revert bump in the minimum supported Rust version
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants