sys/times.h, setreuid/setregid, and sigpending

This commit is contained in:
Andrew Salmon 2017-05-26 15:24:54 -07:00
parent eaaa277dc3
commit 6fb7c90ad0
2 changed files with 16 additions and 0 deletions

View File

@ -105,6 +105,7 @@ fn main() {
cfg.header("syslog.h");
cfg.header("semaphore.h");
cfg.header("sys/statvfs.h");
cfg.header("sys/times.h");
}
if android {

View File

@ -125,10 +125,19 @@ s! {
pub sival_ptr: *mut ::c_void
}
// <sys/time.h>
pub struct itimerval {
pub it_interval: ::timeval,
pub it_value: ::timeval,
}
// <sys/times.h>
pub struct tms {
pub tms_utime: ::clock_t,
pub tms_stime: ::clock_t,
pub tms_cutime: ::clock_t,
pub tms_cstime: ::clock_t,
}
}
pub const SIG_DFL: sighandler_t = 0 as sighandler_t;
@ -467,6 +476,8 @@ extern {
pub fn setpgid(pid: pid_t, pgid: pid_t) -> ::c_int;
pub fn setsid() -> pid_t;
pub fn setuid(uid: uid_t) -> ::c_int;
pub fn setreuid(ruid: uid_t, euid: uid_t) -> ::c_int;
pub fn setregid(rgid: gid_t, egid: gid_t) -> ::c_int;
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
link_name = "sleep$UNIX2003")]
pub fn sleep(secs: ::c_uint) -> ::c_uint;
@ -573,6 +584,8 @@ extern {
#[cfg_attr(target_os = "netbsd", link_name = "__gettimeofday50")]
pub fn gettimeofday(tp: *mut ::timeval,
tz: *mut ::c_void) -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__times13")]
pub fn times(buf: *mut ::tms) -> ::clock_t;
pub fn pthread_self() -> ::pthread_t;
pub fn pthread_create(native: *mut ::pthread_t,
@ -802,6 +815,8 @@ extern {
set: *const sigset_t,
oldset: *mut sigset_t)
-> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__sigpending14")]
pub fn sigpending(set: *mut sigset_t) -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__timegm50")]
pub fn timegm(tm: *mut ::tm) -> time_t;