move timeval to sys_select
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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>.
|
||||
|
||||
Reference in New Issue
Block a user