From 5fb0c2e4ec7a27f5c102fcb7df6ecc6089f79471 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sun, 5 Sep 2021 16:00:49 -0700 Subject: [PATCH] Deprecate Linux's `POLLRDHUP`. `POLLRDHUP` erroneously has type `c_int`. To prepare for changing it to `c_short` (and also moving it to `src/unix/linux_like` so that it's available on Android as well), mark it as deprecated. --- src/unix/linux_like/linux/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index ab7d4b9a18113..20cb9ae6e2387 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;