nix
nix copied to clipboard
add safe libc::clock_nanosleep wrapper
Fixes #1299
libc::clock_nanosleep
isn't defined for all platforms. https://github.com/rust-lang/libc/pull/1922 tries to fix this.
this PR is waiting on the next minor release of libc
@maxbla
this PR is waiting on the next minor release of libc
looks like libc 0.2.80 was cut a couple of weeks ago, and includes https://github.com/rust-lang/libc/pull/1922. could you bump the dependency version in Cargo.toml
?
@maxbla
looks like libc 0.2.80 was cut a couple of weeks ago, and includes rust-lang/libc#1922. could you bump the dependency version in
Cargo.toml
?
It seems to me that the bump is already part of the PR: https://github.com/nix-rust/nix/pull/1315/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542R20
The libc dependency has been updated in master since then, so this needs a rebase.
The new problem with this PR is that libc
added clock_nanosleep
for FreeBSD 12+ only. clock_nanosleep
was implemented in FreeBSD 11.1, so libc
couldn't add a wrapper for FreeBSD 11 (if it did, libc
would fail to build for FreeBSD 11.0). As long as FreeBSD 11.x remains in tier 1 for nix
, this PR can't be merged.
The new problem with this PR is that
libc
addedclock_nanosleep
for FreeBSD 12+ only.clock_nanosleep
was implemented in FreeBSD 11.1, solibc
couldn't add a wrapper for FreeBSD 11 (if it did,libc
would fail to build for FreeBSD 11.0). As long as FreeBSD 11.x remains in tier 1 fornix
, this PR can't be merged.
Actually, that's not a problem. For one thing, Rust's FFI bindings don't know whether a function is present at build time. And they don't care whether it's present at runtime unless somebody tries to use it. For another thing, FreeBSD 11.0 is EoL. We shouldn't worry about it anymore. Long Live FreeBSD 11.4.
Are there any updates to this?
Is it realistic that there will be progress here?
Gentle ping on the author @maxbla, are you still interested in finishing this PR? If not, I think I will pick it up add it to Nix:)