Skip to content

Commit

Permalink
Deprecate Linux's POLLRDHUP.
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
sunfishcode committed Sep 12, 2021
1 parent 5fefaf6 commit 5fb0c2e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 5fb0c2e

Please sign in to comment.