From b55c1d54fc1fdefe80d8a7a66739e8ea934a28a7 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 16 Jun 2021 11:41:32 -0700 Subject: [PATCH] Define `POLLRDHUP` for Linux. `POLLRDHUP` is a Linux-specific extension introduced in Linux 2.6.17. It's documented in the [Linux `poll` man page]. [Linux `poll` man page]: https://man7.org/linux/man-pages/man2/poll.2.html --- src/unix/linux_like/linux/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 84cf57a818e52..3a55809264824 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -3036,6 +3036,11 @@ 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; +#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64")))] +pub const POLLRDHUP: ::c_int = 0x2000; +#[cfg(any(target_arch = "sparc", target_arch = "sparc64"))] +pub const POLLRDHUP: ::c_int = 0x800; + f! { pub fn NLA_ALIGN(len: ::c_int) -> ::c_int { return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1)