mirror of
https://github.com/ziglang/zig.git
synced 2024-12-03 10:28:48 +00:00
freebsd, netbsd, dragonfly: add struct timeval
This commit is contained in:
parent
3e8aaee829
commit
1640c357f4
@ -20,6 +20,7 @@ pub const off_t = c_long;
|
||||
pub const mode_t = c_uint;
|
||||
pub const uid_t = u32;
|
||||
pub const gid_t = u32;
|
||||
pub const suseconds_t = c_long;
|
||||
|
||||
pub const ENOTSUP = EOPNOTSUPP;
|
||||
pub const EWOULDBLOCK = EAGAIN;
|
||||
@ -190,6 +191,13 @@ pub const timespec = extern struct {
|
||||
tv_nsec: c_long,
|
||||
};
|
||||
|
||||
pub const timeval = extern struct {
|
||||
/// seconds
|
||||
tv_sec: time_t,
|
||||
/// microseconds
|
||||
tv_usec: suseconds_t,
|
||||
};
|
||||
|
||||
pub const CTL_UNSPEC = 0;
|
||||
pub const CTL_KERN = 1;
|
||||
pub const CTL_VM = 2;
|
||||
|
@ -26,6 +26,7 @@ pub const time_t = i64;
|
||||
pub const clock_t = isize;
|
||||
|
||||
pub const socklen_t = u32;
|
||||
pub const suseconds_t = c_long;
|
||||
|
||||
/// Renamed from `kevent` to `Kevent` to avoid conflict with function name.
|
||||
pub const Kevent = extern struct {
|
||||
@ -169,6 +170,13 @@ pub const timespec = extern struct {
|
||||
tv_nsec: isize,
|
||||
};
|
||||
|
||||
pub const timeval = extern struct {
|
||||
/// seconds
|
||||
tv_sec: time_t,
|
||||
/// microseconds
|
||||
tv_usec: suseconds_t,
|
||||
};
|
||||
|
||||
pub const dirent = extern struct {
|
||||
d_fileno: usize,
|
||||
d_off: i64,
|
||||
|
@ -22,6 +22,7 @@ pub const socklen_t = u32;
|
||||
pub const time_t = i64;
|
||||
pub const uid_t = u32;
|
||||
pub const lwpid_t = i32;
|
||||
pub const suseconds_t = c_int;
|
||||
|
||||
/// Renamed from `kevent` to `Kevent` to avoid conflict with function name.
|
||||
pub const Kevent = extern struct {
|
||||
@ -190,6 +191,13 @@ pub const timespec = extern struct {
|
||||
tv_nsec: isize,
|
||||
};
|
||||
|
||||
pub const timeval = extern struct {
|
||||
/// seconds
|
||||
tv_sec: time_t,
|
||||
/// microseconds
|
||||
tv_usec: suseconds_t,
|
||||
};
|
||||
|
||||
pub const MAXNAMLEN = 511;
|
||||
|
||||
pub const dirent = extern struct {
|
||||
|
Loading…
Reference in New Issue
Block a user