Skip to content

Commit 225363b

Browse files
committed
move EPOLLEXCLUSIVE and EPOLLWAKEUP to linux/mod.rs
1 parent 0ac1028 commit 225363b

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

libc-test/build.rs

+7
Original file line numberDiff line numberDiff line change
@@ -2657,6 +2657,13 @@ fn test_linux(target: &str) {
26572657

26582658
"MS_RMT_MASK" if uclibc => true, // updated in glibc 2.22 and musl 1.1.13
26592659

2660+
// These are not defined in uclibc but will be passed through to the kernel
2661+
// so they will be supported if the kernel supports them. Otherwise the
2662+
// kernel will return runtime errors. Since they're required for tokio
2663+
// support, we except them from the tests here.
2664+
// See https://github.com/rust-lang/libc/pull/2019#issuecomment-754351482
2665+
"EPOLLEXCLUSIVE" | "EPOLLWAKEUP" if uclibc => true,
2666+
26602667
// FIXME: Requires recent kernel headers (5.8):
26612668
"STATX_MNT_ID" => true,
26622669

src/unix/linux_like/linux/gnu/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -887,8 +887,6 @@ pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
887887
pub const PTRACE_LISTEN: ::c_uint = 0x4208;
888888
pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
889889

890-
pub const EPOLLWAKEUP: ::c_int = 0x20000000;
891-
892890
// linux/fs.h
893891

894892
// Flags for preadv2/pwritev2

src/unix/linux_like/linux/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,8 @@ pub const SHM_HUGETLB: ::c_int = 0o4000;
13751375
pub const SHM_NORESERVE: ::c_int = 0o10000;
13761376

13771377
pub const EPOLLRDHUP: ::c_int = 0x2000;
1378+
pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000;
1379+
pub const EPOLLWAKEUP: ::c_int = 0x20000000;
13781380
pub const EPOLLONESHOT: ::c_int = 0x40000000;
13791381

13801382
pub const QFMT_VFS_OLD: ::c_int = 1;

src/unix/linux_like/linux/musl/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,6 @@ pub const PF_NFC: ::c_int = AF_NFC;
585585
pub const PF_VSOCK: ::c_int = AF_VSOCK;
586586
pub const PF_XDP: ::c_int = AF_XDP;
587587

588-
pub const EPOLLWAKEUP: ::c_int = 0x20000000;
589-
590588
pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
591589

592590
pub const SFD_NONBLOCK: ::c_int = ::O_NONBLOCK;

src/unix/linux_like/linux/uclibc/mips/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ pub const SA_RESETHAND: ::c_int = 0x80000000;
2828
pub const SA_RESTART: ::c_int = 0x10000000;
2929
pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
3030

31-
pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000; // from linux/mod.rs
32-
pub const EPOLLWAKEUP: ::c_int = 0x20000000; // from linux/other/mod.rs
3331
pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
3432

3533
pub const EFD_CLOEXEC: ::c_int = 0x80000;

0 commit comments

Comments
 (0)