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

Ucred returns pid field for OpenBSD. #3919

Merged
merged 3 commits into from
Jul 6, 2021

Conversation

devnexen
Copy link
Contributor

@devnexen devnexen commented Jul 4, 2021

No description provided.

@Darksonn
Copy link
Contributor

Darksonn commented Jul 4, 2021

Is this because it currently does the wrong thing? Can we have a test that catches it?

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-net Module: tokio/net labels Jul 4, 2021
@devnexen
Copy link
Contributor Author

devnexen commented Jul 4, 2021

Not so much but more to address #3102

@Darksonn
Copy link
Contributor

Darksonn commented Jul 4, 2021

Aha, that would be nice to include in the description.

@Darksonn
Copy link
Contributor

Darksonn commented Jul 4, 2021

Please push new commits instead of amending your existing commit. It makes it easier for me to see what changed since I last looked.

@devnexen
Copy link
Contributor Author

devnexen commented Jul 4, 2021

was mostly stylistic as I do not have rustfmt on my netbsd VM.

Comment on lines 56 to 62
#[cfg(target_os = "openbsd")]
use libc::sockpeercred;
#[cfg(any(target_os = "linux", target_os = "android"))]
use libc::ucred;
#[cfg(target_os = "openbsd")]
#[allow(non_camel_case_types)]
type ucred = sockpeercred;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#[cfg(target_os = "openbsd")]
use libc::sockpeercred;
#[cfg(any(target_os = "linux", target_os = "android"))]
use libc::ucred;
#[cfg(target_os = "openbsd")]
#[allow(non_camel_case_types)]
type ucred = sockpeercred;
#[cfg(target_os = "openbsd")]
use libc::sockpeercred as ucred;
#[cfg(any(target_os = "linux", target_os = "android"))]
use libc::ucred;

Comment on lines 144 to 145
}
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
Copy link
Contributor

Choose a reason for hiding this comment

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

Just inserting a newline here.

Suggested change
}
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
}
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

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

This seems right. It's a bit unfortunate that we don't have tests for any of this though.

@Darksonn Darksonn merged commit 8148b21 into tokio-rs:master Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-net Module: tokio/net
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants