summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco A L Barbosa <malbarbo@gmail.com>2017-06-08 21:24:00 -0300
committerMarco A L Barbosa <malbarbo@gmail.com>2017-06-08 21:24:00 -0300
commitef7e8e9017d275495f62994620fe2f9dcd98e8c8 (patch)
treee4d5ec0bec5b1b3e681aabcaacdc8e41f78f45c7
parent4228e72eb179843d709ec723377fa8176ef4d06a (diff)
parent439a4d7d4bc86526e3765d75438edb54ae247246 (diff)
downloadrust-libc-ef7e8e9017d275495f62994620fe2f9dcd98e8c8.tar.gz
Merge branch 'master' of https://github.com/rust-lang/libc into emscripten
-rw-r--r--libc-test/build.rs5
-rw-r--r--src/unix/notbsd/linux/mod.rs7
-rw-r--r--src/unix/notbsd/linux/other/b64/x86_64.rs3
-rw-r--r--src/unix/notbsd/mod.rs10
4 files changed, 25 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 0c01a95168..41953600b0 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -182,6 +182,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 || emscripten {
@@ -195,6 +198,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");
}
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 4572270cec..e50f507691 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -700,6 +700,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;
@@ -1036,6 +1040,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 {
diff --git a/src/unix/notbsd/linux/other/b64/x86_64.rs b/src/unix/notbsd/linux/other/b64/x86_64.rs
index ac72359980..e1b65e8e71 100644
--- a/src/unix/notbsd/linux/other/b64/x86_64.rs
+++ b/src/unix/notbsd/linux/other/b64/x86_64.rs
@@ -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;
}
diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs
index ccbcca3b35..dbca759dfa 100644
--- a/src/unix/notbsd/mod.rs
+++ b/src/unix/notbsd/mod.rs
@@ -987,9 +987,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! {