summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/backend/libc/event/types.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/backend/libc/event/types.rs')
-rw-r--r--vendor/rustix/src/backend/libc/event/types.rs22
1 files changed, 20 insertions, 2 deletions
diff --git a/vendor/rustix/src/backend/libc/event/types.rs b/vendor/rustix/src/backend/libc/event/types.rs
index 632b1be63..af052a434 100644
--- a/vendor/rustix/src/backend/libc/event/types.rs
+++ b/vendor/rustix/src/backend/libc/event/types.rs
@@ -1,7 +1,19 @@
#[cfg(any(linux_kernel, target_os = "freebsd", target_os = "illumos"))]
-use {crate::backend::c, bitflags::bitflags};
+use crate::backend::c;
+#[cfg(any(
+ linux_kernel,
+ target_os = "freebsd",
+ target_os = "illumos",
+ target_os = "espidf"
+))]
+use bitflags::bitflags;
-#[cfg(any(linux_kernel, target_os = "freebsd", target_os = "illumos"))]
+#[cfg(any(
+ linux_kernel,
+ target_os = "freebsd",
+ target_os = "illumos",
+ target_os = "espidf"
+))]
bitflags! {
/// `EFD_*` flags for use with [`eventfd`].
///
@@ -10,10 +22,16 @@ bitflags! {
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct EventfdFlags: u32 {
/// `EFD_CLOEXEC`
+ #[cfg(not(target_os = "espidf"))]
const CLOEXEC = bitcast!(c::EFD_CLOEXEC);
/// `EFD_NONBLOCK`
+ #[cfg(not(target_os = "espidf"))]
const NONBLOCK = bitcast!(c::EFD_NONBLOCK);
/// `EFD_SEMAPHORE`
+ #[cfg(not(target_os = "espidf"))]
const SEMAPHORE = bitcast!(c::EFD_SEMAPHORE);
+
+ /// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
+ const _ = !0;
}
}