Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/fuchsia/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ s! {
pub modtime: time_t,
}

#[derive(Default)]
pub struct timeval {
pub tv_sec: time_t,
pub tv_usec: suseconds_t,
}

#[derive(Default)]
pub struct timespec {
pub tv_sec: time_t,
pub tv_nsec: c_long,
Expand Down
1 change: 1 addition & 0 deletions src/hermit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ s! {
pub st_ctim: timespec,
}

#[derive(Default)]
pub struct timespec {
pub tv_sec: time_t,
pub tv_nsec: i32,
Expand Down
2 changes: 2 additions & 0 deletions src/new/qurt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,13 @@ s! {
pub tm_isdst: c_int,
}

#[derive(Default)]
pub struct timespec {
pub tv_sec: time_t,
pub tv_nsec: c_long,
}

#[derive(Default)]
pub struct timeval {
pub tv_sec: time_t,
pub tv_usec: suseconds_t,
Expand Down
1 change: 1 addition & 0 deletions src/solid/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ s! {
pub iov_len: size_t,
}

#[derive(Default)]
pub struct timeval {
pub tv_sec: c_long,
pub tv_usec: c_long,
Expand Down
2 changes: 2 additions & 0 deletions src/teeos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ s! {
bits: [c_ulong; 128 / size_of::<c_ulong>()],
}

#[derive(Default)]
pub struct timespec {
pub tv_sec: time_t,
pub tv_nsec: c_long,
}

#[derive(Default)]
pub struct timeval {
pub tv_sec: time_t,
pub tv_usec: suseconds_t,
Expand Down
1 change: 1 addition & 0 deletions src/trusty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ s! {
pub iov_len: size_t,
}

#[derive(Default)]
pub struct timespec {
pub tv_sec: time_t,
pub tv_nsec: c_long,
Expand Down
1 change: 1 addition & 0 deletions src/unix/bsd/apple/b64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use crate::prelude::*;

s! {
#[derive(Default)]
pub struct timeval32 {
pub tv_sec: i32,
pub tv_usec: i32,
Expand Down
1 change: 1 addition & 0 deletions src/unix/hurd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ s! {
pub si_value: crate::sigval,
}

#[derive(Default)]
pub struct timespec {
pub tv_sec: __time_t,
pub tv_nsec: __syscall_slong_t,
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ s! {

// linux x32 compatibility
// See https://sourceware.org/bugzilla/show_bug.cgi?id=16437
#[derive(Default)]
pub struct timespec {
pub tv_sec: time_t,
#[cfg(all(gnu_time_bits64, target_endian = "big"))]
Expand Down
2 changes: 2 additions & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ s! {
pub modtime: time_t,
}

#[derive(Default)]
pub struct timeval {
pub tv_sec: time_t,
#[cfg(not(gnu_time_bits64))]
Expand All @@ -69,6 +70,7 @@ s! {

// linux x32 compatibility
// See https://sourceware.org/bugzilla/show_bug.cgi?id=16437
#[derive(Default)]
#[cfg(not(target_env = "gnu"))]
pub struct timespec {
pub tv_sec: time_t,
Expand Down
2 changes: 2 additions & 0 deletions src/vxworks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ s! {
}

// b_struct_timeval.h
#[derive(Default)]
pub struct timeval {
pub tv_sec: crate::time_t,
pub tv_usec: crate::suseconds_t,
Expand Down Expand Up @@ -332,6 +333,7 @@ s! {
}

// b_struct_timespec.h
#[derive(Default)]
pub struct timespec {
pub tv_sec: crate::time_t,
pub tv_nsec: c_long,
Expand Down
2 changes: 2 additions & 0 deletions src/wasi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,13 @@ s! {
pub __tm_nsec: c_int,
}

#[derive(Default)]
pub struct timeval {
pub tv_sec: time_t,
pub tv_usec: suseconds_t,
}

#[derive(Default)]
pub struct timespec {
pub tv_sec: time_t,
pub tv_nsec: c_long,
Expand Down
2 changes: 2 additions & 0 deletions src/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,13 @@ s! {
pub tm_isdst: c_int,
}

#[derive(Default)]
pub struct timeval {
pub tv_sec: c_long,
pub tv_usec: c_long,
}

#[derive(Default)]
pub struct timespec {
pub tv_sec: time_t,
pub tv_nsec: c_long,
Expand Down