Skip to content
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

Add and rearrange a few fcntl pieces #1756

Closed
wants to merge 1 commit into from
Closed

Conversation

khuey
Copy link

@khuey khuey commented May 10, 2020

Add f_owner_ex, F_GET/SETOWN_EX, F_GET/SETSIG, and move F_OWNER_* to the toplevel linux-like module because they're libc and platform agnostic.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@joshtriplett
Copy link
Member

Closing and reopening to re-run CI.

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

The definition itself looks good to me but we need to tweak the test to pass CI.

@@ -504,6 +504,11 @@ s! {
pub ee_info: u32,
pub ee_data: u32,
}

pub struct f_owner_ex {
pub type_: ::c_int,
Copy link
Member

Choose a reason for hiding this comment

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

We should add f_owner_ex here:

libc/libc-test/build.rs

Lines 2513 to 2522 in 0d37400

// The following structs have a field called `type` in C,
// but `type` is a Rust keyword, so these fields are translated
// to `type_` in Rust.
"type_"
if struct_ == "input_event"
|| struct_ == "input_mask"
|| struct_ == "ff_effect" =>
{
"type".to_string()
}

@bors
Copy link
Contributor

bors commented Jan 7, 2021

☔ The latest upstream changes (presumably #2006) made this pull request unmergeable. Please resolve the merge conflicts.

…the toplevel linux-like module because they're libc and platform agnostic.
@khuey
Copy link
Author

khuey commented Mar 16, 2021

I'm still not sure how to get this test to pass unfortunately. There appears to be something going wrong inside ctest, perhaps?

@JohnTitor

@JohnTitor
Copy link
Member

Hey thanks for the ping and sorry for the long delay!
The problem here is that glibc uses a private enum for the type field thus CI issues it:
https://github.com/bminor/glibc/blob/21c3f4b5368686ade28d90d8c7d79c4c95c72c1b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h#L263-L279

If it will work properly with c_int anyway, we could skip tests for the field and go ahead.

@bors
Copy link
Contributor

bors commented Jun 13, 2021

☔ The latest upstream changes (presumably #2233) made this pull request unmergeable. Please resolve the merge conflicts.

@JohnTitor
Copy link
Member

I'm going to close as inactive, feel free to rebase and re-open when you get some time :)

@JohnTitor JohnTitor closed this Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants