Auto merge of #608 - Uplifting:unix, r=alexcrichton
add a number of linux syscalls vfork, wait4, getresuid, getresgid, personality, vhangup, swapon, swapoff, getdomainname, setdomainname, iopl, ioperm
This commit is contained in:
commit
439a4d7d4b
|
@ -181,6 +181,9 @@ fn main() {
|
|||
cfg.header("sys/fsuid.h");
|
||||
cfg.header("pty.h");
|
||||
cfg.header("shadow.h");
|
||||
if x86_64 {
|
||||
cfg.header("sys/io.h");
|
||||
}
|
||||
}
|
||||
|
||||
if linux || android {
|
||||
|
@ -194,6 +197,8 @@ fn main() {
|
|||
cfg.header("sys/sendfile.h");
|
||||
cfg.header("sys/vfs.h");
|
||||
cfg.header("sys/syscall.h");
|
||||
cfg.header("sys/personality.h");
|
||||
cfg.header("sys/swap.h");
|
||||
if !uclibc {
|
||||
cfg.header("sys/sysinfo.h");
|
||||
}
|
||||
|
|
|
@ -704,6 +704,10 @@ pub const PR_CAP_AMBIENT_RAISE: ::c_int = 2;
|
|||
pub const PR_CAP_AMBIENT_LOWER: ::c_int = 3;
|
||||
pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4;
|
||||
|
||||
pub const ITIMER_REAL: ::c_int = 0;
|
||||
pub const ITIMER_VIRTUAL: ::c_int = 1;
|
||||
pub const ITIMER_PROF: ::c_int = 2;
|
||||
|
||||
pub const XATTR_CREATE: ::c_int = 0x1;
|
||||
pub const XATTR_REPLACE: ::c_int = 0x2;
|
||||
|
||||
|
@ -1006,6 +1010,9 @@ extern {
|
|||
flags: ::c_int) -> ::ssize_t;
|
||||
pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
|
||||
-> ::ssize_t;
|
||||
pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
|
||||
pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
|
||||
pub fn vhangup() -> ::c_int;
|
||||
}
|
||||
|
||||
extern {
|
||||
|
|
|
@ -574,4 +574,7 @@ extern {
|
|||
argc: ::c_int, ...);
|
||||
pub fn swapcontext(uocp: *mut ucontext_t,
|
||||
ucp: *const ucontext_t) -> ::c_int;
|
||||
pub fn iopl(level: ::c_int) -> ::c_int;
|
||||
pub fn ioperm(from: ::c_ulong, num: ::c_ulong,
|
||||
turn_on: ::c_int) -> ::c_int;
|
||||
}
|
||||
|
|
|
@ -989,9 +989,19 @@ extern {
|
|||
pub fn sigsuspend(mask: *const ::sigset_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;
|
||||
pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t,
|
||||
suid: *mut ::uid_t) -> ::c_int;
|
||||
pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t,
|
||||
sgid: *mut ::gid_t) -> ::c_int;
|
||||
pub fn personality(persona: ::c_ulong) -> ::c_int;
|
||||
pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int;
|
||||
pub fn swapoff(puath: *const ::c_char) -> ::c_int;
|
||||
pub fn acct(filename: *const ::c_char) -> ::c_int;
|
||||
pub fn brk(addr: *mut ::c_void) -> ::c_int;
|
||||
pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void;
|
||||
pub fn vfork() -> ::pid_t;
|
||||
pub fn wait4(pid: ::pid_t, status: *mut ::c_int, options: ::c_int,
|
||||
rusage: *mut ::rusage) -> ::pid_t;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
|
Loading…
Reference in New Issue