Repository navigation
Conversation
|
Thanks for the pull request, and welcome! The Rust Project has assigned @LawnGnome (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
Corresponding libc PR: rust-lang/libc#5555
7910336 to
89eb084
Compare
|
☔ The latest upstream changes (presumably #164757) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
|
Just catching up on the last month of notifications, sorry. I don't have any context on nuttx, so I'm going to re-roll this. @rustbot reroll |
|
I don't know anything about nuttx either, cc @no1wudi as target maintainer From a quick glance it looks like rust-lang/libc#5555 was merged now, but only into the main branch, so it's only in the libc 1.0 pre-release, not in any 0.2.x release. My understanding is that more steps are needed before std can use the updated libc definitions:
However, looking at the actual changes here, I'm not sure if this is the right way. Duplicating various struct literals just to add fields which are internal to the libc implementation on some platform doesn't seem great for maintainability. Perhaps there's a way to rewrite the affected code that works the same on all platforms including NuttX? |
I'm not sure what the update process for libc is, I just wanted to provide the required changes upfront so it won't break.
I agree, do you see a better solution? The primary alternative I see is using Default: let mut pollfd = libc::pollfd {
fd: self.as_raw_fd(),
events: libc::POLLOUT,
revents: 0,
..Default::default()
};Which would require implementing |
|
I would suggest the pattern of creating the C struct with rust/library/std/src/sys/process/unix/pidfd.rs Lines 31 to 32 in 96a18bf Then we should be able to merge this PR independently of when the libc fix makes it into a libc 0.2.x release and that release is adopted by the standard library. @rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
This goes together with this libc PR: rust-lang/libc#5555