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

pub extern crate libc can probably be used now. #655

Closed
marmistrz opened this issue Jul 7, 2017 · 2 comments
Closed

pub extern crate libc can probably be used now. #655

marmistrz opened this issue Jul 7, 2017 · 2 comments

Comments

@marmistrz
Copy link
Contributor

https://github.com/nix-rust/nix/blob/master/src/lib.rs#L26

// In rust 1.8+ this should be `pub extern crate libc` but prior
// to https://github.com/rust-lang/rust/issues/26775 being resolved
// it is necessary to get a little creative.
pub mod libc {
    extern crate libc;
    pub use self::libc::*;
}

rust-lang/rust#26775 has already been closed.

@Susurrus
Copy link
Contributor

Susurrus commented Jul 7, 2017

Actually, it can't. See here for the original issue. And the release notes for Rust 1.4 suggest this is still the case.

I believe the solution is to do:

extern crate libc;
pub use libc

@jonas-schievink
Copy link
Contributor

Nah this should work fine by now

bors bot added a commit that referenced this issue Jul 25, 2017
694: Remove workaround for `pub extern crate` r=Susurrus

On semi-recent Rust versions (I think 1.8+) this now works properly.

Closes #655
bors bot added a commit that referenced this issue Jul 25, 2017
694: Remove workaround for `pub extern crate` r=asomers

On semi-recent Rust versions (I think 1.8+) this now works properly.

Closes #655
@bors bors bot closed this as completed in #694 Jul 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants