Enable clock_gettime on wasi
I think this mostly addresses the issues that were brought up in #1307 regarding clock ids; I made clockid_t a wrapper struct because it needs to be Send and Sync to be used in a constant, and I figured it was opaque in wasi-libc anyway. Instead of static ZSTs, I just made them `u8`s, since I figured it's very unlikely that wasi-libc would change them from `struct __clockid { __wasi_clockid_t id; }` to `struct __clockid {}`, and it'll always be valid to treat a static as a `/(u8)+/`. One thing I was wondering about, should I add a cfg check to `build.rs` checking for `core::ptr::addr_of`? Since I *think*(?) using that would fix any issue of __clockid becoming a "zst" struct in the future.
DragonFly's devname_r takes a size_t len parameter
#2435 introduced this function on DragonFly BSD with FreeBSD's signature, which is incorrect. Deprecate it, to be fixed in a subsequent release.
c163a4d7ee/include/stdlib.h (L285)
Deprecate FIODGNAME on DragonFly, add FIODNAME
`FIODGNAME` is FreeBSD specific, but `FIODNAME` exists on DragonFly which appears to provide similar functionality.
[FreeBSD definition](dc6dd769de/sys/sys/filio.h (L60))
[DragonFly definition](20f6ddd0df/sys/sys/filio.h (L59))
`FIODGNAME` is appearing in the `libc-test` failures on DragonFly. Deprecate it, to be removed in a subsequent release.
Move Linux's `POLLRDHUP` into `linux_like` and fix its type.
This was originally posted as #2390, but since it was a breaking change,
that PR instead just added `deprecated` warnings. There haven't been any
concerns for a while, so this is now a PR to do the change actually, per
the [breaking-change-policy].
This fixes two errors in #2247.
- It moves the definitions of `POLLRDHUP` out of `linux_like/linux`
and into `linux_like`, so that they're available on Android as well.
- It changes the type from `c_int` to `c_short` to match the other
`POLL*` flags.
[breaking-change-policy]: https://github.com/rust-lang/libc/blob/master/CONTRIBUTING.md#breaking-change-policy
This was originally posted as #2390, but since it was a breaking change,
that PR instead just added `deprecated` warnings. There haven't been any
concerns for a while, so this is now a PR to do the change actually, per
the [breaking-change-policy].
This fixes two errors in #2247.
- It moves the definitions of `POLLRDHUP` out of `linux_like/linux`
and into `linux_like`, so that they're available on Android as well.
- It changes the type from `c_int` to `c_short` to match the other
`POLL*` flags.
[breaking-change-policy]: https://github.com/rust-lang/libc/blob/master/CONTRIBUTING.md#breaking-change-policy