Skip to content

Commit 9fee1d0

Browse files
committed
Auto merge of #2247 - sunfishcode:sunfishcode/pollrdhup, r=Amanieu
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
2 parents 599ae1b + b55c1d5 commit 9fee1d0

File tree

1 file changed

+5
-0
lines changed
  • src/unix/linux_like/linux

1 file changed

+5
-0
lines changed

src/unix/linux_like/linux/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3036,6 +3036,11 @@ pub const SOL_CAN_BASE: ::c_int = 100;
30363036
pub const CAN_INV_FILTER: canid_t = 0x20000000;
30373037
pub const CAN_RAW_FILTER_MAX: ::c_int = 512;
30383038

3039+
#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64")))]
3040+
pub const POLLRDHUP: ::c_int = 0x2000;
3041+
#[cfg(any(target_arch = "sparc", target_arch = "sparc64"))]
3042+
pub const POLLRDHUP: ::c_int = 0x800;
3043+
30393044
f! {
30403045
pub fn NLA_ALIGN(len: ::c_int) -> ::c_int {
30413046
return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1)

0 commit comments

Comments
 (0)