authorgravatar for 14938807+xackus@users.noreply.github.comxackus <14938807+xackus@users.noreply.github.com> 2021-01-05 12:49:56+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-01-05 13:07:25-08:00
log1640c357f42e0fc18d88a02995c25094063fef5e
treef870cd7905c28a4027c32f227ff20c77d2ddb448
parent3e8aaee829584f4893cad5c524076d2300f45f24

freebsd, netbsd, dragonfly: add struct timeval


3 files changed, 24 insertions(+), 0 deletions(-)

lib/std/os/bits/dragonfly.zig+8
......@@ -20,6 +20,7 @@ pub const off_t = c_long;
2020pub const mode_t = c_uint;
2121pub const uid_t = u32;
2222pub const gid_t = u32;
23pub const suseconds_t = c_long;
2324
2425pub const ENOTSUP = EOPNOTSUPP;
2526pub const EWOULDBLOCK = EAGAIN;
......@@ -190,6 +191,13 @@ pub const timespec = extern struct {
190191 tv_nsec: c_long,
191192};
192193
194pub const timeval = extern struct {
195 /// seconds
196 tv_sec: time_t,
197 /// microseconds
198 tv_usec: suseconds_t,
199};
200
193201pub const CTL_UNSPEC = 0;
194202pub const CTL_KERN = 1;
195203pub const CTL_VM = 2;
lib/std/os/bits/freebsd.zig+8
......@@ -26,6 +26,7 @@ pub const time_t = i64;
2626pub const clock_t = isize;
2727
2828pub const socklen_t = u32;
29pub const suseconds_t = c_long;
2930
3031/// Renamed from `kevent` to `Kevent` to avoid conflict with function name.
3132pub const Kevent = extern struct {
......@@ -169,6 +170,13 @@ pub const timespec = extern struct {
169170 tv_nsec: isize,
170171};
171172
173pub const timeval = extern struct {
174 /// seconds
175 tv_sec: time_t,
176 /// microseconds
177 tv_usec: suseconds_t,
178};
179
172180pub const dirent = extern struct {
173181 d_fileno: usize,
174182 d_off: i64,
lib/std/os/bits/netbsd.zig+8
......@@ -22,6 +22,7 @@ pub const socklen_t = u32;
2222pub const time_t = i64;
2323pub const uid_t = u32;
2424pub const lwpid_t = i32;
25pub const suseconds_t = c_int;
2526
2627/// Renamed from `kevent` to `Kevent` to avoid conflict with function name.
2728pub const Kevent = extern struct {
......@@ -190,6 +191,13 @@ pub const timespec = extern struct {
190191 tv_nsec: isize,
191192};
192193
194pub const timeval = extern struct {
195 /// seconds
196 tv_sec: time_t,
197 /// microseconds
198 tv_usec: suseconds_t,
199};
200
193201pub const MAXNAMLEN = 511;
194202
195203pub const dirent = extern struct {