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

Let freebsd and openbsd access 'poll' #710

Closed
wants to merge 3 commits into from

Conversation

berkowski
Copy link
Contributor

Gave freebsd and openbsd access to 'poll'. Don't see a reason why other bsd's shouldn't be added as well. Might make more sense to add exclusive #cfg(not(...) statements around a few OS's instead of long strings of acceptable targets.

@asomers
Copy link
Member

asomers commented Jul 29, 2017

Thanks for fixing this. Could you please add a CHANGELOG entry too?

@asomers asomers self-requested a review July 29, 2017 19:23
@berkowski
Copy link
Contributor Author

berkowski commented Jul 29, 2017

Sure thing.

CHANGELOG.md Outdated
@@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
- Enabled `nix::poll` for 'freebsd' and 'netbsd' targets
Copy link
Member

Choose a reason for hiding this comment

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

This should have the same format as other CHANGELOG messages. Move it into the Changed section, and add a link to the PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, my mistake. Sorry for the noise

@berkowski
Copy link
Contributor Author

Added #711 as this PR doesn't fix the issue for other BSD's

@asomers
Copy link
Member

asomers commented Jul 29, 2017

Is there some reason not to add NetBSD and Dragonfly support right now? Do they have poll definitions in libc?

@berkowski
Copy link
Contributor Author

berkowski commented Jul 29, 2017

Only reason at the moment is that I can't easily check locally by using cross to cross-compile with an appropriate bsd toolchain (only x86_64-unknown-freebsd and -netbsd are available as targets in rustup).

I could go through libc, see how things are supported by other BSD's, and try to add support; just can't really test it. Maybe as a separate PR?

@asomers
Copy link
Member

asomers commented Jul 29, 2017

You should inspect the code for libc and enable poll on all platforms that have libc support. Better yet would be to inspect the C libraries for each of the BSDs, and add libc poll bindings for any platforms that lack it. Our CI system will catch any mistakes for FreeBSD or NetBSD. OpenBSD and Dragonfly aren't officially supported by Nix, so nobody will be upset with you if you break the build for one of those platforms.

@berkowski
Copy link
Contributor Author

Fair enough. I'll expand the PR to the other BSD's supported by rust-lang/libc

@Susurrus
Copy link
Contributor

This is already covered in #672 which is close to merging.

@berkowski
Copy link
Contributor Author

Great. Well I just made a small fuss about nothing then. Sorry for that, didn't catch it in the active issues or PR's

@berkowski berkowski closed this Jul 29, 2017
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.

3 participants