Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
  • Loading branch information
sunfishcode committed Jun 16, 2021
commit b55c1d54fc1fdefe80d8a7a66739e8ea934a28a7
5 changes: 5 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down