move timeval to sys_select

This commit is contained in:
Ron Williams
2026-01-30 15:53:15 +00:00
parent a32fd56e61
commit 2c3201eaeb
11 changed files with 35 additions and 28 deletions
+1 -4
View File
@@ -1,4 +1,4 @@
sys_includes = ["bits/sys/select.h", "sys/time.h", "signal.h"]
sys_includes = ["bits/sys/select.h", "time.h", "signal.h"]
include_guard = "_SYS_SELECT_H"
language = "C"
style = "Tag"
@@ -11,6 +11,3 @@ prefix_with_name = true
[export]
# fd_set is also defined in C because cbindgen is incompatible with mem::size_of booo
exclude = ["FD_SETSIZE", "fd_set"]
[export.rename]
"timeval" = "struct timeval"
+13 -2
View File
@@ -14,11 +14,22 @@ use crate::{
EPOLL_CLOEXEC, EPOLL_CTL_ADD, EPOLLERR, EPOLLIN, EPOLLOUT, epoll_create1, epoll_ctl,
epoll_data, epoll_event, epoll_wait,
},
sys_time::timeval,
},
platform::{self, types::c_int},
platform::{
self,
types::{c_int, suseconds_t, time_t},
},
};
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_select.h.html>.
///
#[repr(C)]
#[derive(Default)]
pub struct timeval {
pub tv_sec: time_t,
pub tv_usec: suseconds_t,
}
// fd_set is also defined in C because cbindgen is incompatible with mem::size_of booo
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_select.h.html>.