add a number of syscalls

vfork, wait4, getresuid, getresgid, personality, vhangup,
swapon, swapoff, getdomainname, setdomainname, iopl, ioperm
This commit is contained in:
Andrew Salmon 2017-06-07 16:26:42 -07:00
parent f1b62c3f4a
commit c98b9f7d4e
3 changed files with 23 additions and 0 deletions

View File

@ -193,6 +193,9 @@ 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");
cfg.header("sys/io.h");
if !uclibc {
cfg.header("sys/sysinfo.h");
}

View File

@ -703,6 +703,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;

View File

@ -989,9 +989,25 @@ 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 vhangup() -> ::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 getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
pub fn setdomainname(name: *const ::c_char, len: ::size_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;
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! {