Skip to content

Commit ef7e8e9

Browse files
committed
Merge branch 'master' of https://github.com/rust-lang/libc into emscripten
2 parents 4228e72 + 439a4d7 commit ef7e8e9

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

libc-test/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ fn main() {
182182
cfg.header("sys/fsuid.h");
183183
cfg.header("pty.h");
184184
cfg.header("shadow.h");
185+
if x86_64 {
186+
cfg.header("sys/io.h");
187+
}
185188
}
186189

187190
if linux || android || emscripten {
@@ -195,6 +198,8 @@ fn main() {
195198
cfg.header("sys/sendfile.h");
196199
cfg.header("sys/vfs.h");
197200
cfg.header("sys/syscall.h");
201+
cfg.header("sys/personality.h");
202+
cfg.header("sys/swap.h");
198203
if !uclibc {
199204
cfg.header("sys/sysinfo.h");
200205
}

src/unix/notbsd/linux/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,10 @@ pub const PR_CAP_AMBIENT_RAISE: ::c_int = 2;
700700
pub const PR_CAP_AMBIENT_LOWER: ::c_int = 3;
701701
pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4;
702702

703+
pub const ITIMER_REAL: ::c_int = 0;
704+
pub const ITIMER_VIRTUAL: ::c_int = 1;
705+
pub const ITIMER_PROF: ::c_int = 2;
706+
703707
pub const XATTR_CREATE: ::c_int = 0x1;
704708
pub const XATTR_REPLACE: ::c_int = 0x2;
705709

@@ -1036,6 +1040,9 @@ extern {
10361040
flags: ::c_int) -> ::ssize_t;
10371041
pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
10381042
-> ::ssize_t;
1043+
pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
1044+
pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
1045+
pub fn vhangup() -> ::c_int;
10391046
}
10401047

10411048
extern {

src/unix/notbsd/linux/other/b64/x86_64.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,4 +574,7 @@ extern {
574574
argc: ::c_int, ...);
575575
pub fn swapcontext(uocp: *mut ucontext_t,
576576
ucp: *const ucontext_t) -> ::c_int;
577+
pub fn iopl(level: ::c_int) -> ::c_int;
578+
pub fn ioperm(from: ::c_ulong, num: ::c_ulong,
579+
turn_on: ::c_int) -> ::c_int;
577580
}

src/unix/notbsd/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,9 +987,19 @@ extern {
987987
pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
988988
pub fn setreuid(ruid: ::uid_t, euid: ::uid_t) -> ::c_int;
989989
pub fn setregid(rgid: ::gid_t, egid: ::gid_t) -> ::c_int;
990+
pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t,
991+
suid: *mut ::uid_t) -> ::c_int;
992+
pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t,
993+
sgid: *mut ::gid_t) -> ::c_int;
994+
pub fn personality(persona: ::c_ulong) -> ::c_int;
995+
pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int;
996+
pub fn swapoff(puath: *const ::c_char) -> ::c_int;
990997
pub fn acct(filename: *const ::c_char) -> ::c_int;
991998
pub fn brk(addr: *mut ::c_void) -> ::c_int;
992999
pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void;
1000+
pub fn vfork() -> ::pid_t;
1001+
pub fn wait4(pid: ::pid_t, status: *mut ::c_int, options: ::c_int,
1002+
rusage: *mut ::rusage) -> ::pid_t;
9931003
}
9941004

9951005
cfg_if! {

0 commit comments

Comments
 (0)