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 some TCP constants #1151

Merged
merged 1 commit into from
Nov 27, 2018
Merged

Add some TCP constants #1151

merged 1 commit into from
Nov 27, 2018

Conversation

Fensteer
Copy link
Contributor

Add some TCP constants according to the sources : https://github.com/freebsd/freebsd/blob/master/sys/netinet/tcp.h#L164

@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 @alexcrichton (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.

@asomers
Copy link
Contributor

asomers commented Nov 26, 2018

Did you check the DragonflyBSD sources? I bet that many of these symbols are defined identically there. If so, they belong in src/unix/bsd/freebsdlike/mod.rs. Unless, of course, NetBSD and OpenBSD also define them identically, in which case they can go in src/unix/bsd/mod.rs.

@Fensteer
Copy link
Contributor Author

I tried to put it in src/unix/bsd/mod.rs but darwin targets failed: https://travis-ci.org/rust-lang/libc/builds/459839121
Dragonfly doesn't defined the same constants: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/e7ab884bd49753f8884eb597d10d6569a08fa0df/sys/netinet/tcp_var.h#L164

@asomers
Copy link
Contributor

asomers commented Nov 26, 2018

That's the wrong file. You want tcp.h, not tcp_var.h. Dragonfly does define some of the same constants.
https://github.com/DragonFlyBSD/DragonFlyBSD/blob/e7ab884bd49753f8884eb597d10d6569a08fa0df/sys/netinet/tcp.h

@Fensteer Fensteer changed the title Add FreeBSD TCP constants Add some TCP constants Nov 27, 2018
@Fensteer
Copy link
Contributor Author

Done, I tried to add TCP_CA_NAME_MAX but it's not available in userspace so I removed it.

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 27, 2018

Could you rebase ?

@Fensteer
Copy link
Contributor Author

Done, I squashed the commits

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 27, 2018

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 27, 2018

📌 Commit 32a7d17 has been approved by gnzlbg

@bors
Copy link
Contributor

bors commented Nov 27, 2018

⌛ Testing commit 32a7d17 with merge 914e50a...

bors added a commit that referenced this pull request Nov 27, 2018
@bors
Copy link
Contributor

bors commented Nov 27, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: gnzlbg
Pushing 914e50a to master...

@bors bors merged commit 32a7d17 into rust-lang:master Nov 27, 2018
@semarie
Copy link
Contributor

semarie commented Nov 27, 2018

FYI, it broke the build on OpenBSD (there is no CI). I am working on unbreak it

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 27, 2018

Damn. Would it be possible to contribute an OpenBSD build bot to CI similar to how the FreeBSD build bot works ?

@asomers
Copy link
Contributor

asomers commented Nov 27, 2018

@gnzlbg Are you thinking of Nix's buildbot? libc doesn't use buildbot, only Travis. libc's FreeBSD builder runs in QEMU on Travis. AFAIK the same technique should be possible for OpenBSD.

@semarie
Copy link
Contributor

semarie commented Nov 27, 2018

for FreeBSD, the CI does a crosscompilation from linux to freebsd, and run the executable via qemu. Last time I tried to do crosscompilation from linux to openbsd it was really difficult. Maybe it could be tested again as now we recently switched to clang + ld.lld.

@semarie semarie mentioned this pull request Nov 27, 2018
@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 27, 2018

@asomers no I was thinking of what @semarie mentions, cross compiling from linux to OpenBSD and then running the binaries under qemu.

bors added a commit that referenced this pull request Nov 27, 2018
Openbsd unbreak

- unbreak openbsd after #1128
- unbreak openbsd after #1151
- while here, add `KERN_CPUSTATS` and increment `KERN_MAXID` for openbsd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants