fix: define eventfd_t locally instead of re-export (cbindgen cross-module)

This commit is contained in:
Red Bear OS
2026-06-28 16:21:45 +03:00
parent 0c5f21d297
commit e25fd20708
+6 -3
View File
@@ -4,10 +4,13 @@ use crate::error::{Errno, ResultExt};
use crate::header::fcntl::{O_CLOEXEC, O_NONBLOCK, O_RDWR};
use crate::header::errno::EFAULT;
use crate::header::errno::EINVAL;
use crate::platform::{Pal, Sys, types::{c_int, c_uint}};
use crate::platform::{Pal, Sys, types::{c_int, c_uint, uint64_t}};
// Re-export eventfd_t from bits/eventfd.h
pub use crate::header::bits_eventfd::eventfd_t;
// cbindgen can't resolve re-exports across modules, so eventfd_t is
// defined here directly (the C typedef lives in after_includes in
// cbindgen.toml). bits_eventfd still has its own copy for independent
// consumers that include only <bits/eventfd.h>.
pub type eventfd_t = uint64_t;
pub const EFD_SEMAPHORE: c_int = 1;
pub const EFD_CLOEXEC: c_int = 0x80000;