diff options
author | bors <bors@rust-lang.org> | 2021-09-12 22:44:13 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2021-09-12 22:44:13 +0000 |
commit | 82a3396a23c0d5128b7f860eebb31d9cbac0696e (patch) | |
tree | 887b289b39383399679f72dde25cfd9c0ad57cfc | |
parent | fe6531e124596228cf8971babd8265b670b31cf3 (diff) | |
parent | 5fb0c2e4ec7a27f5c102fcb7df6ecc6089f79471 (diff) | |
download | rust-libc-82a3396a23c0d5128b7f860eebb31d9cbac0696e.tar.gz |
Auto merge of #2390 - sunfishcode:sunfishcode/linux-pollrdhup, r=JohnTitor
Move Linux's `POLLRDHUP` into `linux_like` and fix its type.
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.
This second change is a breaking change, and I'm fine reverting it and
leaving it as the old type if that's the right thing to do.
-rw-r--r-- | src/unix/linux_like/linux/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index ab7d4b9a18..20cb9ae6e2 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -3037,8 +3037,16 @@ pub const SOL_CAN_BASE: ::c_int = 100; pub const CAN_INV_FILTER: canid_t = 0x20000000; pub const CAN_RAW_FILTER_MAX: ::c_int = 512; +#[deprecated( + since = "0.2.102", + note = "Errnoeously uses c_int; should use c_short." +)] #[cfg(not(any(target_arch = "sparc", target_arch = "sparc64")))] pub const POLLRDHUP: ::c_int = 0x2000; +#[deprecated( + since = "0.2.102", + note = "Errnoeously uses c_int; should use c_short." +)] #[cfg(any(target_arch = "sparc", target_arch = "sparc64"))] pub const POLLRDHUP: ::c_int = 0x800; |