move timeval to sys_select
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
sys_includes = ["sys/types.h", "features.h"]
|
||||
sys_includes = ["sys/types.h", "features.h", "sys/select.h"]
|
||||
include_guard = "_SYS_TIME_H"
|
||||
language = "C"
|
||||
trailer = "#include <bits/sys/time.h>"
|
||||
@@ -8,3 +8,6 @@ cpp_compat = true
|
||||
|
||||
[enum]
|
||||
prefix_with_name = true
|
||||
|
||||
[export.rename]
|
||||
"timeval" = "struct timeval"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
use crate::{
|
||||
c_str::CStr,
|
||||
error::ResultExt,
|
||||
header::time::timespec,
|
||||
header::{sys_select::timeval, time::timespec},
|
||||
out::Out,
|
||||
platform::{
|
||||
Pal, PalSignal, Sys,
|
||||
@@ -59,16 +59,6 @@ pub struct itimerval {
|
||||
pub it_value: timeval,
|
||||
}
|
||||
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_time.h.html>.
|
||||
///
|
||||
/// TODO: specified for `sys/select.h` in modern POSIX?
|
||||
#[repr(C)]
|
||||
#[derive(Default)]
|
||||
pub struct timeval {
|
||||
pub tv_sec: time_t,
|
||||
pub tv_usec: suseconds_t,
|
||||
}
|
||||
|
||||
/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man2/gettimeofday.2.html>.
|
||||
#[repr(C)]
|
||||
#[derive(Default)]
|
||||
|
||||
Reference in New Issue
Block a user