Merge branch 'susecond-t' into 'master'
Fix linux suseconds_t to fix alarm test See merge request redox-os/relibc!1203
This commit is contained in:
@@ -16,7 +16,11 @@ typedef unsigned id_t;
|
||||
typedef long ssize_t;
|
||||
typedef long long time_t;
|
||||
typedef unsigned int useconds_t;
|
||||
#if defined(__linux__)
|
||||
typedef long suseconds_t;
|
||||
#else
|
||||
typedef int suseconds_t;
|
||||
#endif
|
||||
typedef long clock_t;
|
||||
typedef int clockid_t;
|
||||
typedef void* timer_t;
|
||||
|
||||
@@ -124,6 +124,12 @@ pub type fsfilcnt_t = c_ulong;
|
||||
#[deprecated]
|
||||
pub type useconds_t = c_uint;
|
||||
/// The `suseconds_t` type provided in [`sys/types.h`](crate::header::sys_types).
|
||||
#[cfg(target_os = "linux")]
|
||||
pub type suseconds_t = c_long;
|
||||
// TODO: Should we break this to c_long as well? This also breaks timeval as well
|
||||
// but it will be consistent with timespec.tv_nsec (note that syscall already uses c_int)
|
||||
/// The `suseconds_t` type provided in [`sys/types.h`](crate::header::sys_types).
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
pub type suseconds_t = c_int;
|
||||
|
||||
/// The `clock_t` type provided in [`sys/types.h`](crate::header::sys_types).
|
||||
|
||||
Reference in New Issue
Block a user