From bc79f4fc496c6f4af0c085e87bfde0b9047fcd14 Mon Sep 17 00:00:00 2001 From: Nicolas Dusart Date: Wed, 12 Jul 2017 15:30:36 +0200 Subject: [PATCH] add poll constants to Android --- src/unix/notbsd/android/mod.rs | 3 +++ src/unix/notbsd/linux/mips/mod.rs | 2 -- src/unix/notbsd/linux/musl/mod.rs | 3 --- src/unix/notbsd/linux/other/mod.rs | 3 --- src/unix/notbsd/linux/s390x.rs | 2 -- src/unix/notbsd/mod.rs | 3 +++ 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs index be527f0c94541..0cbe634eb2f53 100644 --- a/src/unix/notbsd/android/mod.rs +++ b/src/unix/notbsd/android/mod.rs @@ -808,6 +808,9 @@ pub const TIOCM_DSR: ::c_int = 0x100; pub const TIOCM_CD: ::c_int = TIOCM_CAR; pub const TIOCM_RI: ::c_int = TIOCM_RNG; +pub const POLLWRNORM: ::c_short = 0x100; +pub const POLLWRBAND: ::c_short = 0x200; + f! { pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { for slot in cpuset.__bits.iter_mut() { diff --git a/src/unix/notbsd/linux/mips/mod.rs b/src/unix/notbsd/linux/mips/mod.rs index d0c9294be2c48..a4fd8d78099ce 100644 --- a/src/unix/notbsd/linux/mips/mod.rs +++ b/src/unix/notbsd/linux/mips/mod.rs @@ -381,9 +381,7 @@ pub const SIG_SETMASK: ::c_int = 3; pub const SIG_BLOCK: ::c_int = 0x1; pub const SIG_UNBLOCK: ::c_int = 0x2; -pub const POLLRDNORM: ::c_short = 0x040; pub const POLLWRNORM: ::c_short = 0x004; -pub const POLLRDBAND: ::c_short = 0x080; pub const POLLWRBAND: ::c_short = 0x100; pub const PTHREAD_STACK_MIN: ::size_t = 131072; diff --git a/src/unix/notbsd/linux/musl/mod.rs b/src/unix/notbsd/linux/musl/mod.rs index c7841721fb18a..bf16d4d8786d6 100644 --- a/src/unix/notbsd/linux/musl/mod.rs +++ b/src/unix/notbsd/linux/musl/mod.rs @@ -203,9 +203,6 @@ pub const MADV_DONTDUMP: ::c_int = 16; pub const EPOLLWAKEUP: ::c_int = 0x20000000; -pub const POLLRDNORM: ::c_short = 0x040; -pub const POLLRDBAND: ::c_short = 0x080; - pub const MADV_HUGEPAGE: ::c_int = 14; pub const MADV_NOHUGEPAGE: ::c_int = 15; diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs index 6dc59c78fa3d8..783866e8241ca 100644 --- a/src/unix/notbsd/linux/other/mod.rs +++ b/src/unix/notbsd/linux/other/mod.rs @@ -269,9 +269,6 @@ pub const SIGWINCH: ::c_int = 28; pub const SIGEV_THREAD_ID: ::c_int = 4; -pub const POLLRDNORM: ::c_short = 0x040; -pub const POLLRDBAND: ::c_short = 0x080; - pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01; pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02; diff --git a/src/unix/notbsd/linux/s390x.rs b/src/unix/notbsd/linux/s390x.rs index 52c35a6f9c729..3f14bafce2dd1 100644 --- a/src/unix/notbsd/linux/s390x.rs +++ b/src/unix/notbsd/linux/s390x.rs @@ -846,9 +846,7 @@ pub const B3000000: ::speed_t = 0o010015; pub const B3500000: ::speed_t = 0o010016; pub const B4000000: ::speed_t = 0o010017; -pub const POLLRDNORM: ::c_short = 0x040; pub const POLLWRNORM: ::c_short = 0x004; -pub const POLLRDBAND: ::c_short = 0x080; pub const POLLWRBAND: ::c_short = 0x100; #[link(name = "util")] diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs index d07401e52e996..244a34d044887 100644 --- a/src/unix/notbsd/mod.rs +++ b/src/unix/notbsd/mod.rs @@ -761,6 +761,9 @@ pub const P_PGID: idtype_t = 2; pub const UTIME_OMIT: c_long = 1073741822; pub const UTIME_NOW: c_long = 1073741823; +pub const POLLRDNORM: ::c_short = 0x040; +pub const POLLRDBAND: ::c_short = 0x080; + f! { pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { let fd = fd as usize;