-
Notifications
You must be signed in to change notification settings - Fork 1k
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 missing networking support for Illumos/Solaris as used in quinn #3717
Conversation
r? @JohnTitor rustbot has assigned @JohnTitor. Use |
|
@JohnTitor can you please have look at this? Thank you! |
@JohnTitor is there anything wrong with this pull request? |
r? @tgross35 Can you please help with merging of this? |
src/unix/mod.rs
Outdated
#[cfg_attr(target_os = "illumos", link_name = "__xnet_socket")] | ||
#[cfg_attr(target_os = "solaris", link_name = "__xnet_socket")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dedupe the same link names (applies a couple other places in these files)
#[cfg_attr(target_os = "illumos", link_name = "__xnet_socket")] | |
#[cfg_attr(target_os = "solaris", link_name = "__xnet_socket")] | |
#[cfg_attr(any(target_os = "illumos", target_os = "solaris"), link_name = "__xnet_socket")] |
I am not sure what to check against, are there docs/headers online for the constants? Changes themselves look fine to me with one nit above. Please rebase and squash so the merge commits go away. (Also, I assume the PR title and commit is meant to say "add missing stuff". Please make this more descriptive, e.g. "Add missing networking support for solaris".) |
src/unix/solarish/mod.rs
Outdated
#[cfg_attr(target_os = "illumos", link_name = "__xnet_bind")] | ||
#[cfg_attr(target_os = "solaris", link_name = "__xnet_bind")] | ||
pub fn bind(socket: ::c_int, address: *const ::sockaddr, address_len: ::socklen_t) -> ::c_int; | ||
|
||
pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; | ||
pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; | ||
|
||
#[cfg_attr(target_os = "illumos", link_name = "__xnet_sendmsg")] | ||
#[cfg_attr(target_os = "solaris", link_name = "__xnet_sendmsg")] | ||
pub fn sendmsg(fd: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t; | ||
#[cfg_attr(target_os = "illumos", link_name = "__xnet_recvmsg")] | ||
#[cfg_attr(target_os = "solaris", link_name = "__xnet_recvmsg")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For cases where the link_name
now applies to both illumos and Solaris, there should be no need for the cfg_attr
test while in unix/solarish/mod.rs
The only way how to review header files I can think of is:
|
I don't have a cfarm account so that would take a couple days. Since @pfmooney has already verified illumos, I have no objection to merging. This should have an update |
@rustbot author |
(backport <rust-lang#3717>) (cherry picked from commit 7d2eb94)
No description provided.