Skip to content

Commit 4507241

Browse files
committed
move EPOLLEXCLUSIVE and EPOLLWAKEUP to linux/mod.rs
1 parent ee13a88 commit 4507241

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

libc-test/build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2643,6 +2643,12 @@ fn test_linux(target: &str) {
26432643

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

2646+
// These are not defined in uclibc but will be passed through to the kernel
2647+
// so they will be supported if the kernel supports them. Otherwise the
2648+
// kernel will return runtime errors. Since they're required for tokio
2649+
// support, we except them from the tests here.
2650+
// See https://github.com/rust-lang/libc/pull/2019#issuecomment-754351482
2651+
"EPOLLEXCLUSIVE" | "EPOLLWAKEUP" if uclibc => true,
26462652
_ => false,
26472653
}
26482654
});

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,8 +885,6 @@ pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
885885
pub const PTRACE_LISTEN: ::c_uint = 0x4208;
886886
pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
887887

888-
pub const EPOLLWAKEUP: ::c_int = 0x20000000;
889-
890888
// linux/rtnetlink.h
891889
pub const TCA_PAD: ::c_ushort = 9;
892890
pub const TCA_DUMP_INVISIBLE: ::c_ushort = 10;

src/unix/linux_like/linux/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,6 +1373,8 @@ pub const SHM_HUGETLB: ::c_int = 0o4000;
13731373
pub const SHM_NORESERVE: ::c_int = 0o10000;
13741374

13751375
pub const EPOLLRDHUP: ::c_int = 0x2000;
1376+
pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000;
1377+
pub const EPOLLWAKEUP: ::c_int = 0x20000000;
13761378
pub const EPOLLONESHOT: ::c_int = 0x40000000;
13771379

13781380
pub const QFMT_VFS_OLD: ::c_int = 1;

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,6 @@ pub const PF_NFC: ::c_int = AF_NFC;
582582
pub const PF_VSOCK: ::c_int = AF_VSOCK;
583583
pub const PF_XDP: ::c_int = AF_XDP;
584584

585-
pub const EPOLLWAKEUP: ::c_int = 0x20000000;
586-
587585
pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
588586

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

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

Lines changed: 0 additions & 2 deletions
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)