Skip to content

illumos fixups #1984

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

Merged
merged 2 commits into from
Nov 27, 2020
Merged

illumos fixups #1984

merged 2 commits into from
Nov 27, 2020

Conversation

jclulow
Copy link
Contributor

@jclulow jclulow commented Nov 26, 2020

I needed TCP_MAXSEG for use with 0.3.x of socket2, and while I was there I figured I would add the rest of the TCP socket options we have on illumos. Many of these are common with Solaris, but some are not; I have attempted to put them in the correct place so that they will only be active where they are valid.

The other commit in this PR gags the test for setservent() and endservent(), which on illumos have some complexity with respect to return types under different compilation conditions.

I don't have an Oracle Solaris system on which to test, but on my relatively current illumos system the tests pass:

$ (cd libc-test && CC_x86_64_unknown_illumos=clang AR_x86_64_unknown_illumos=gar cargo test)
   Compiling libc v0.2.80 (/ws/safari/libc)
   Compiling libc-test v0.1.0 (/ws/safari/libc/libc-test)
    Finished test [unoptimized + debuginfo] target(s) in 12.45s
     Running /ws/safari/libc/target/debug/deps/cmsg-9ceed5ee937b4c5f

running 5 tests
test t::test_cmsg_data ... ok
test t::test_cmsg_firsthdr ... ok
test t::test_cmsg_len ... ok
test t::test_cmsg_space ... ok
test t::test_cmsg_nxthdr ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running /ws/safari/libc/target/debug/deps/errqueue-70aa763a9ed1f681

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running /ws/safari/libc/target/debug/deps/linux_elf-534b101b72339f59
PASSED 0 tests
     Running /ws/safari/libc/target/debug/deps/linux_fcntl-4dca948e65c4e2bb
PASSED 0 tests
     Running /ws/safari/libc/target/debug/deps/linux_ipv6-74ce6ee23c41bad1
PASSED 0 tests
     Running /ws/safari/libc/target/debug/deps/linux_strerror_r-c7705986f4a1d214
PASSED 0 tests
     Running /ws/safari/libc/target/debug/deps/linux_termios-690bf406ed77f8a9
PASSED 0 tests
     Running /ws/safari/libc/target/debug/deps/main-0b8735d9db2c09ba
RUNNING ALL TESTS
PASSED 6543 tests

Depending on the compilation environment (e.g., whether the 3XNET or
3SOCKET version of these functions is in play, whether EXTENSIONS has
been defined, etc) these functions may be declared to return either void
or int.  The return value is hard coded as zero, and can be ignored to
better align with other platforms where these functions are always void.
The socket2 crate now depends on TCP_MAXSEG, and the rest of the options
may as well come along for the ride.
@rust-highfive
Copy link

r? @JohnTitor

(rust-highfive has picked a reviewer for you, use r? to override)

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.

Looks good!

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 27, 2020

📌 Commit 6b78ca9 has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented Nov 27, 2020

⌛ Testing commit 6b78ca9 with merge e5b7d9f...

@bors
Copy link
Contributor

bors commented Nov 27, 2020

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: JohnTitor
Pushing e5b7d9f to master...

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.

4 participants