Repository navigation
freebsd: Fix cfg gates for FreeBSD 12 - #1707
Conversation
| target_os = "dragonfly", | ||
| target_os = "emscripten", | ||
| target_os = "espidf", | ||
| target_os = "freebsd", // FreeBSD 12 has clock_nanosleep, but libc targets FreeBSD 11. |
There was a problem hiding this comment.
This comment was no longer accurate. libc has targeted FreeBSD 12 since 0.2.176 . I think that if you simply raise your minimum libc version to 0.2.176 you can delete lines like this, safe in the knowledge that clock_nanosleep will always be available on FreeBSD.
There was a problem hiding this comment.
@asomers Are you sure about this: https://github.com/rust-lang/libc/tree/libc-0.2/src/unix/bsd/freebsdlike/freebsd/freebsd11
Related: rust-lang/libc#3139
There was a problem hiding this comment.
That proposal is about removing the FreeBSD 11 bindings. Making 12 the default was a different PR: rust-lang/libc#2406 .
There was a problem hiding this comment.
Thanks for the comments!
I updated the PR to accommodate FreeBSD 12 as the default minimum. Rustix's libc is already at the correct version anyway. I'll work on adding gates for FreeBSD 13+ after this lands.
b1261e0 to
71561d6
Compare
xtqqczze
left a comment
There was a problem hiding this comment.
fixup with these changes please
| /// - [Linux] | ||
| /// | ||
| /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/mknodat.html | ||
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?mknodat(2) |
There was a problem hiding this comment.
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?mknodat(2) | |
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=mknodat&sektion=2 |
| /// - [Linux] | ||
| /// | ||
| /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/mkfifoat.html | ||
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?mkfifoat(2) |
There was a problem hiding this comment.
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?mkfifoat(2) | |
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=mkfifoat&sektion=2 |
| /// - [Linux] | ||
| /// | ||
| /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_nanosleep.html | ||
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?nanosleep(2) |
There was a problem hiding this comment.
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?nanosleep(2) | |
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=nanosleep&sektion=2 |
| /// - [Linux] | ||
| /// | ||
| /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_nanosleep.html | ||
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?nanosleep(2) |
There was a problem hiding this comment.
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?nanosleep(2) | |
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=nanosleep&sektion=2 |
| /// - [Linux] | ||
| /// | ||
| /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/nanosleep.html | ||
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?nanosleep(2) |
There was a problem hiding this comment.
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?nanosleep(2) | |
| /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=nanosleep&sektion=2 |
| /// | ||
| /// # References | ||
| /// - [POSIX] | ||
| /// - [FreeBSD] |
There was a problem hiding this comment.
nit: the other files in the repo have [FreeBSD] after [Linux].
FreeBSD 12 is now the minimum supported version by libc. The current gates are too conservative since they gate away the `nanosleep` functions which are available for FreeBSD 12+. See: * https://doc.rust-lang.org/nightly/rustc/platform-support/freebsd.html
71561d6 to
d062f21
Compare
|
Thanks! |
FreeBSD 12 is now the minimum supported version by libc. The current gates are too conservative since they gate away the
nanosleepfunctions which are available for FreeBSD 12+.See: