diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
commit | d1b2d29528b7794b41e66fc2136e395a02f8529b (patch) | |
tree | a4a17504b260206dec3cf55b2dca82929a348ac2 /vendor/rustix/src/backend/libc/event | |
parent | Releasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip |
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/rustix/src/backend/libc/event')
-rw-r--r-- | vendor/rustix/src/backend/libc/event/poll_fd.rs | 6 | ||||
-rw-r--r-- | vendor/rustix/src/backend/libc/event/syscalls.rs | 14 |
2 files changed, 17 insertions, 3 deletions
diff --git a/vendor/rustix/src/backend/libc/event/poll_fd.rs b/vendor/rustix/src/backend/libc/event/poll_fd.rs index 49a6d1126..a06812aaa 100644 --- a/vendor/rustix/src/backend/libc/event/poll_fd.rs +++ b/vendor/rustix/src/backend/libc/event/poll_fd.rs @@ -26,18 +26,20 @@ bitflags! { /// `POLLRDNORM` const RDNORM = c::POLLRDNORM; /// `POLLWRNORM` + #[cfg(not(target_os = "l4re"))] const WRNORM = c::POLLWRNORM; /// `POLLRDBAND` - #[cfg(not(target_os = "wasi"))] + #[cfg(not(any(target_os = "l4re", target_os = "wasi")))] const RDBAND = c::POLLRDBAND; /// `POLLWRBAND` - #[cfg(not(target_os = "wasi"))] + #[cfg(not(any(target_os = "l4re", target_os = "wasi")))] const WRBAND = c::POLLWRBAND; /// `POLLERR` const ERR = c::POLLERR; /// `POLLHUP` const HUP = c::POLLHUP; /// `POLLNVAL` + #[cfg(not(target_os = "espidf"))] const NVAL = c::POLLNVAL; /// `POLLRDHUP` #[cfg(all( diff --git a/vendor/rustix/src/backend/libc/event/syscalls.rs b/vendor/rustix/src/backend/libc/event/syscalls.rs index 11f6af83e..eac88d4bb 100644 --- a/vendor/rustix/src/backend/libc/event/syscalls.rs +++ b/vendor/rustix/src/backend/libc/event/syscalls.rs @@ -33,7 +33,19 @@ pub(crate) fn eventfd(initval: u32, flags: EventfdFlags) -> io::Result<OwnedFd> ret_owned_fd(eventfd2(initval, bitflags_bits!(flags))) } - #[cfg(any(target_os = "freebsd", target_os = "illumos"))] + // `eventfd` was added in FreeBSD 13, so it isn't available on FreeBSD 12. + #[cfg(target_os = "freebsd")] + unsafe { + weakcall! { + fn eventfd( + initval: c::c_uint, + flags: c::c_int + ) -> c::c_int + } + ret_owned_fd(eventfd(initval, bitflags_bits!(flags))) + } + + #[cfg(target_os = "illumos")] unsafe { ret_owned_fd(c::eventfd(initval, bitflags_bits!(flags))) } |