summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml2
-rw-r--r--ci/build.sh4
-rw-r--r--ci/docker/mips64-unknown-linux-muslabi64/Dockerfile15
-rw-r--r--ci/docker/mips64el-unknown-linux-muslabi64/Dockerfile15
-rw-r--r--ci/install-musl.sh14
-rw-r--r--libc-test/build.rs1
-rw-r--r--src/fuchsia/mod.rs190
-rw-r--r--src/lib.rs10
-rw-r--r--src/unix/bsd/apple/b32.rs5
-rw-r--r--src/unix/bsd/apple/b64.rs5
-rw-r--r--src/unix/bsd/apple/mod.rs7
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/mod.rs2
-rw-r--r--src/unix/bsd/freebsdlike/mod.rs10
-rw-r--r--src/unix/bsd/mod.rs14
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/mod.rs6
-rw-r--r--src/unix/bsd/netbsdlike/openbsd/mod.rs4
-rw-r--r--src/unix/linux_like/linux/musl/b64/aarch64.rs160
-rw-r--r--src/unix/linux_like/linux/musl/b64/mips64.rs753
-rw-r--r--src/unix/linux_like/linux/musl/b64/mod.rs203
-rw-r--r--src/unix/linux_like/linux/musl/b64/powerpc64.rs160
-rw-r--r--src/unix/linux_like/linux/musl/b64/x86_64.rs160
-rw-r--r--src/unix/linux_like/linux/musl/mod.rs1
-rw-r--r--src/unix/newlib/aarch64/mod.rs28
-rw-r--r--src/unix/newlib/arm/mod.rs30
-rw-r--r--src/unix/newlib/mod.rs27
-rw-r--r--src/unix/redox/mod.rs121
-rwxr-xr-xsrc/vxworks/mod.rs165
27 files changed, 1532 insertions, 580 deletions
diff --git a/Cargo.toml b/Cargo.toml
index a39ab2945c..2ed71f9f12 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "libc"
-version = "0.2.62"
+version = "0.2.63"
authors = ["The Rust Project Developers"]
license = "MIT OR Apache-2.0"
readme = "README.md"
diff --git a/ci/build.sh b/ci/build.sh
index e63b4f7e2c..3ce10deb32 100644
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -204,6 +204,8 @@ i686-unknown-netbsd \
i686-unknown-openbsd \
mips-unknown-linux-uclibc \
mipsel-unknown-linux-uclibc \
+mips64-unknown-linux-muslabi64 \
+mips64el-unknown-linux-muslabi64 \
nvptx64-nvidia-cuda \
powerpc-unknown-linux-gnuspe \
powerpc-unknown-netbsd \
@@ -224,7 +226,7 @@ x86_64-unknown-haiku \
x86_64-unknown-hermit \
x86_64-unknown-l4re-uclibc \
x86_64-unknown-openbsd \
-armv7-wrs-vxworks \
+armv7-wrs-vxworks-eabihf \
aarch64-wrs-vxworks \
i686-wrs-vxworks \
x86_64-wrs-vxworks \
diff --git a/ci/docker/mips64-unknown-linux-muslabi64/Dockerfile b/ci/docker/mips64-unknown-linux-muslabi64/Dockerfile
new file mode 100644
index 0000000000..8f63ade604
--- /dev/null
+++ b/ci/docker/mips64-unknown-linux-muslabi64/Dockerfile
@@ -0,0 +1,15 @@
+FROM ubuntu:19.04
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+ gcc make libc6-dev git curl ca-certificates \
+ gcc-mips64-linux-gnuabi64 qemu-user
+
+COPY install-musl.sh /
+RUN sh /install-musl.sh mips64
+
+# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd?
+ENV PATH=$PATH:/musl-mips64/bin:/rust/bin \
+ CC_mips64_unknown_linux_muslabi64=musl-gcc \
+ RUSTFLAGS='-Clink-args=-lgcc' \
+ CARGO_TARGET_MIPS64_UNKNOWN_LINUX_MUSLABI64_LINKER=musl-gcc \
+ CARGO_TARGET_MIPS64_UNKNOWN_LINUX_MUSLABI64_RUNNER="qemu-mips64 -L /musl-mips64"
diff --git a/ci/docker/mips64el-unknown-linux-muslabi64/Dockerfile b/ci/docker/mips64el-unknown-linux-muslabi64/Dockerfile
new file mode 100644
index 0000000000..c42c2ba601
--- /dev/null
+++ b/ci/docker/mips64el-unknown-linux-muslabi64/Dockerfile
@@ -0,0 +1,15 @@
+FROM ubuntu:19.04
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+ gcc make libc6-dev git curl ca-certificates \
+ gcc-mips64el-linux-gnuabi64 qemu-user
+
+COPY install-musl.sh /
+RUN sh /install-musl.sh mips64el
+
+# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd?
+ENV PATH=$PATH:/musl-mips64el/bin:/rust/bin \
+ CC_mips64el_unknown_linux_muslabi64=musl-gcc \
+ RUSTFLAGS='-Clink-args=-lgcc' \
+ CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_MUSLABI64_LINKER=musl-gcc \
+ CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_MUSLABI64_RUNNER="qemu-mips64el -L /musl-mips64el"
diff --git a/ci/install-musl.sh b/ci/install-musl.sh
index ab98c4f0f6..d6ec17e604 100644
--- a/ci/install-musl.sh
+++ b/ci/install-musl.sh
@@ -46,6 +46,20 @@ case ${1} in
./configure --prefix="/musl-${musl_arch}"
make install -j4
;;
+ mips64)
+ musl_arch=mips64
+ kernel_arch=mips
+ CC=mips64-linux-gnuabi64-gcc CFLAGS="-march=mips64r2 -mabi=64" \
+ ./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes
+ make install -j4
+ ;;
+ mips64el)
+ musl_arch=mips64el
+ kernel_arch=mips
+ CC=mips64el-linux-gnuabi64-gcc CFLAGS="-march=mips64r2 -mabi=64" \
+ ./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes
+ make install -j4
+ ;;
*)
echo "Unknown target arch: \"${1}\""
exit 1
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 146beb0734..002ece011b 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -264,6 +264,7 @@ fn test_openbsd(target: &str) {
"netinet/ip.h",
"netinet/tcp.h",
"netinet/udp.h",
+ "net/bpf.h",
"resolv.h",
"pthread.h",
"dlfcn.h",
diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs
index f2f9844298..0756866f51 100644
--- a/src/fuchsia/mod.rs
+++ b/src/fuchsia/mod.rs
@@ -3460,7 +3460,6 @@ extern {
pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int;
pub fn alarm(seconds: ::c_uint) -> ::c_uint;
pub fn chdir(dir: *const c_char) -> ::c_int;
- pub fn fchdir(dirfd: ::c_int) -> ::c_int;
pub fn chown(path: *const c_char, uid: uid_t,
gid: gid_t) -> ::c_int;
pub fn lchown(path: *const c_char, uid: uid_t,
@@ -3570,10 +3569,6 @@ extern {
pub fn signal(signum: ::c_int, handler: sighandler_t) -> sighandler_t;
- pub fn getrlimit(resource: ::c_int, rlim: *mut rlimit) -> ::c_int;
- pub fn setrlimit(resource: ::c_int, rlim: *const rlimit) -> ::c_int;
- pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int;
-
pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char)
-> *mut ::c_char;
@@ -3683,7 +3678,6 @@ extern {
proto: *const ::c_char) -> *mut servent;
pub fn getprotobyname(name: *const ::c_char) -> *mut protoent;
pub fn getprotobynumber(proto: ::c_int) -> *mut protoent;
- pub fn chroot(name: *const ::c_char) -> ::c_int;
pub fn usleep(secs: ::c_uint) -> ::c_int;
pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
flags: ::c_int) -> ::ssize_t;
@@ -3770,7 +3764,6 @@ extern {
pub fn closelog();
pub fn setlogmask(maskpri: ::c_int) -> ::c_int;
pub fn syslog(priority: ::c_int, message: *const ::c_char, ...);
- pub fn nice(incr: ::c_int) -> ::c_int;
pub fn grantpt(fd: ::c_int) -> ::c_int;
pub fn posix_openpt(flags: ::c_int) -> ::c_int;
@@ -3778,8 +3771,6 @@ extern {
pub fn unlockpt(fd: ::c_int) -> ::c_int;
pub fn fdatasync(fd: ::c_int) -> ::c_int;
- pub fn mincore(addr: *mut ::c_void, len: ::size_t,
- vec: *mut ::c_uchar) -> ::c_int;
pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
@@ -3795,11 +3786,7 @@ extern {
ptr: *const ::gid_t) -> ::c_int;
pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
- pub fn statfs64(path: *const ::c_char, buf: *mut statfs64) -> ::c_int;
pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
- pub fn fstatfs64(fd: ::c_int, buf: *mut statfs64) -> ::c_int;
- pub fn statvfs64(path: *const ::c_char, buf: *mut statvfs64) -> ::c_int;
- pub fn fstatvfs64(fd: ::c_int, buf: *mut statvfs64) -> ::c_int;
pub fn memrchr(cx: *const ::c_void,
c: ::c_int,
n: ::size_t) -> *mut ::c_void;
@@ -3815,43 +3802,6 @@ extern {
locale: *const ::c_char,
base: ::locale_t) -> ::locale_t;
pub fn uselocale(loc: ::locale_t) -> ::locale_t;
- pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int;
- pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int;
- pub fn fstatat64(dirfd: ::c_int, pathname: *const c_char,
- buf: *mut stat64, flags: ::c_int) -> ::c_int;
- pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int;
- pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int;
- pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t;
- pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
- pub fn mmap64(addr: *mut ::c_void,
- len: ::size_t,
- prot: ::c_int,
- flags: ::c_int,
- fd: ::c_int,
- offset: off64_t)
- -> *mut ::c_void;
- pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
- pub fn openat64(fd: ::c_int,
- path: *const c_char,
- oflag: ::c_int, ...) -> ::c_int;
- pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
- offset: off64_t) -> ::ssize_t;
- pub fn preadv64(fd: ::c_int,
- iov: *const ::iovec,
- iovcnt: ::c_int,
- offset: ::off64_t) -> ::ssize_t;
- pub fn pwrite64(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
- offset: off64_t) -> ::ssize_t;
- pub fn pwritev64(fd: ::c_int,
- iov: *const ::iovec,
- iovcnt: ::c_int,
- offset: ::off64_t) -> ::ssize_t;
- pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64;
- pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64,
- result: *mut *mut ::dirent64) -> ::c_int;
- pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int;
- pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
- pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int;
pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
@@ -3861,16 +3811,8 @@ extern {
clock_id: *mut clockid_t) -> ::c_int;
pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
clock_id: ::clockid_t) -> ::c_int;
- pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
- pshared: ::c_int) -> ::c_int;
pub fn accept4(fd: ::c_int, addr: *mut ::sockaddr, len: *mut ::socklen_t,
flg: ::c_int) -> ::c_int;
- pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
- pshared: ::c_int) -> ::c_int;
- pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
- val: *mut ::c_int) -> ::c_int;
- pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
- val: ::c_int) -> ::c_int;
pub fn ptsname_r(fd: ::c_int,
buf: *mut ::c_char,
buflen: ::size_t) -> ::c_int;
@@ -3885,12 +3827,8 @@ extern {
sgid: *mut ::gid_t) -> ::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 setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
- pub fn wait4(pid: ::pid_t, status: *mut ::c_int, options: ::c_int,
- rusage: *mut ::rusage) -> ::pid_t;
pub fn openpty(amaster: *mut ::c_int,
aslave: *mut ::c_int,
name: *mut ::c_char,
@@ -3903,30 +3841,12 @@ extern {
-> ::c_int;
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
- pub fn ptrace(request: ::c_int, ...) -> ::c_long;
- pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
- pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
-
- pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
- pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
- pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
- pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
- pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
- pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
- timeout: *const ::timespec) -> ::c_int;
- pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
- pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
- nitems: ::c_int, sevp: *mut ::sigevent) -> ::c_int;
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
pub fn setpwent();
pub fn endpwent();
pub fn getpwent() -> *mut passwd;
- pub fn setspent();
- pub fn endspent();
- pub fn getspent() -> *mut spwd;
- pub fn getspnam(__name: *const ::c_char) -> *mut spwd;
pub fn shm_open(name: *const c_char, oflag: ::c_int,
mode: mode_t) -> ::c_int;
@@ -3957,47 +3877,12 @@ extern {
-> ::c_int;
pub fn __errno_location() -> *mut ::c_int;
- pub fn fopen64(filename: *const c_char,
- mode: *const c_char) -> *mut ::FILE;
- pub fn freopen64(filename: *const c_char, mode: *const c_char,
- file: *mut ::FILE) -> *mut ::FILE;
- pub fn tmpfile64() -> *mut ::FILE;
- pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int;
- pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
- pub fn fseeko64(stream: *mut ::FILE,
- offset: ::off64_t,
- whence: ::c_int) -> ::c_int;
- pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
pub fn fallocate(fd: ::c_int, mode: ::c_int,
offset: ::off_t, len: ::off_t) -> ::c_int;
pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
len: ::off_t) -> ::c_int;
pub fn readahead(fd: ::c_int, offset: ::off64_t,
count: ::size_t) -> ::ssize_t;
- pub fn getxattr(path: *const c_char, name: *const c_char,
- value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
- pub fn lgetxattr(path: *const c_char, name: *const c_char,
- value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
- pub fn fgetxattr(filedes: ::c_int, name: *const c_char,
- value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
- pub fn setxattr(path: *const c_char, name: *const c_char,
- value: *const ::c_void, size: ::size_t,
- flags: ::c_int) -> ::c_int;
- pub fn lsetxattr(path: *const c_char, name: *const c_char,
- value: *const ::c_void, size: ::size_t,
- flags: ::c_int) -> ::c_int;
- pub fn fsetxattr(filedes: ::c_int, name: *const c_char,
- value: *const ::c_void, size: ::size_t,
- flags: ::c_int) -> ::c_int;
- pub fn listxattr(path: *const c_char, list: *mut c_char,
- size: ::size_t) -> ::ssize_t;
- pub fn llistxattr(path: *const c_char, list: *mut c_char,
- size: ::size_t) -> ::ssize_t;
- pub fn flistxattr(filedes: ::c_int, list: *mut c_char,
- size: ::size_t) -> ::ssize_t;
- pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int;
- pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int;
- pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int;
pub fn signalfd(fd: ::c_int,
mask: *const ::sigset_t,
flags: ::c_int) -> ::c_int;
@@ -4020,26 +3905,6 @@ extern {
special: *const ::c_char,
id: ::c_int,
data: *mut ::c_char) -> ::c_int;
- pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t;
- pub fn mq_close(mqd: ::mqd_t) -> ::c_int;
- pub fn mq_unlink(name: *const ::c_char) -> ::c_int;
- pub fn mq_receive(mqd: ::mqd_t,
- msg_ptr: *mut ::c_char,
- msg_len: ::size_t,
- msq_prio: *mut ::c_uint) -> ::ssize_t;
- pub fn mq_send(mqd: ::mqd_t,
- msg_ptr: *const ::c_char,
- msg_len: ::size_t,
- msq_prio: ::c_uint) -> ::c_int;
- pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int;
- pub fn mq_setattr(mqd: ::mqd_t,
- newattr: *const ::mq_attr,
- oldattr: *mut ::mq_attr) -> ::c_int;
- pub fn epoll_pwait(epfd: ::c_int,
- events: *mut ::epoll_event,
- maxevents: ::c_int,
- timeout: ::c_int,
- sigmask: *const ::sigset_t) -> ::c_int;
pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int;
pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
pub fn mkostemps(template: *mut ::c_char,
@@ -4058,27 +3923,6 @@ extern {
serv: *mut ::c_char,
sevlen: ::socklen_t,
flags: ::c_int) -> ::c_int;
- pub fn pthread_setschedprio(native: ::pthread_t,
- priority: ::c_int) -> ::c_int;
- pub fn prlimit(pid: ::pid_t, resource: ::c_int, new_limit: *const ::rlimit,
- old_limit: *mut ::rlimit) -> ::c_int;
- pub fn prlimit64(pid: ::pid_t,
- resource: ::c_int,
- new_limit: *const ::rlimit64,
- old_limit: *mut ::rlimit64) -> ::c_int;
- pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
- pub fn process_vm_readv(pid: ::pid_t,
- local_iov: *const ::iovec,
- liovcnt: ::c_ulong,
- remote_iov: *const ::iovec,
- riovcnt: ::c_ulong,
- flags: ::c_ulong) -> isize;
- pub fn process_vm_writev(pid: ::pid_t,
- local_iov: *const ::iovec,
- liovcnt: ::c_ulong,
- remote_iov: *const ::iovec,
- riovcnt: ::c_ulong,
- flags: ::c_ulong) -> isize;
pub fn reboot(how_to: ::c_int) -> ::c_int;
pub fn setfsgid(gid: ::gid_t) -> ::c_int;
pub fn setfsuid(uid: ::uid_t) -> ::c_int;
@@ -4093,12 +3937,6 @@ extern {
pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
pub fn freeifaddrs(ifa: *mut ::ifaddrs);
- pub fn mremap(addr: *mut ::c_void,
- len: ::size_t,
- new_len: ::size_t,
- flags: ::c_int,
- ...) -> *mut ::c_void;
-
pub fn glob(pattern: *const c_char,
flags: ::c_int,
errfunc: ::Option<extern fn(epath: *const c_char,
@@ -4156,20 +3994,6 @@ extern {
pub fn sched_setaffinity(pid: ::pid_t,
cpusetsize: ::size_t,
cpuset: *const cpu_set_t) -> ::c_int;
- pub fn epoll_create(size: ::c_int) -> ::c_int;
- pub fn epoll_create1(flags: ::c_int) -> ::c_int;
- pub fn epoll_wait(epfd: ::c_int,
- events: *mut ::epoll_event,
- maxevents: ::c_int,
- timeout: ::c_int) -> ::c_int;
- pub fn epoll_ctl(epfd: ::c_int,
- op: ::c_int,
- fd: ::c_int,
- event: *mut ::epoll_event) -> ::c_int;
- pub fn pthread_getschedparam(native: ::pthread_t,
- policy: *mut ::c_int,
- param: *mut ::sched_param) -> ::c_int;
- pub fn unshare(flags: ::c_int) -> ::c_int;
pub fn umount(target: *const ::c_char) -> ::c_int;
pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
pub fn tee(fd_in: ::c_int,
@@ -4190,7 +4014,6 @@ extern {
pub fn sem_getvalue(sem: *mut sem_t,
sval: *mut ::c_int) -> ::c_int;
pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int;
- pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
pub fn swapoff(puath: *const ::c_char) -> ::c_int;
pub fn vmsplice(fd: ::c_int,
iov: *const ::iovec,
@@ -4202,7 +4025,6 @@ extern {
flags: ::c_ulong,
data: *const ::c_void) -> ::c_int;
pub fn personality(persona: ::c_ulong) -> ::c_int;
- pub fn prctl(option: ::c_int, ...) -> ::c_int;
pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int;
pub fn ppoll(fds: *mut ::pollfd,
nfds: nfds_t,
@@ -4223,21 +4045,11 @@ extern {
guardsize: *mut ::size_t) -> ::c_int;
pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
- pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
- pshared: *mut ::c_int) -> ::c_int;
- pub fn sysinfo(info: *mut ::sysinfo) -> ::c_int;
pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int;
- pub fn pthread_setschedparam(native: ::pthread_t,
- policy: ::c_int,
- param: *const ::sched_param) -> ::c_int;
pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int;
pub fn sched_setscheduler(pid: ::pid_t,
policy: ::c_int,
param: *const ::sched_param) -> ::c_int;
- pub fn sendfile(out_fd: ::c_int,
- in_fd: ::c_int,
- offset: *mut off_t,
- count: ::size_t) -> ::ssize_t;
pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
pub fn getgrgid_r(gid: ::gid_t,
grp: *mut ::group,
@@ -4282,8 +4094,6 @@ extern {
group: ::gid_t,
groups: *mut ::gid_t,
ngroups: *mut ::c_int) -> ::c_int;
- pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
- pshared: *mut ::c_int) -> ::c_int;
pub fn popen(command: *const c_char,
mode: *const c_char) -> *mut ::FILE;
pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
diff --git a/src/lib.rs b/src/lib.rs
index 3c757f75b3..3255303e5a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -15,9 +15,13 @@
#![crate_name = "libc"]
#![crate_type = "rlib"]
#![cfg_attr(libc_deny_warnings, deny(warnings))]
-#![allow(bad_style, overflowing_literals, improper_ctypes, unknown_lints)]
-// FIXME: this is due to a rustc bug
-#![allow(redundant_semicolon)]
+#![allow(
+ bad_style,
+ overflowing_literals,
+ improper_ctypes,
+ unknown_lints,
+ redundant_semicolon
+)]
// Attributes needed when building as part of the standard library
#![cfg_attr(
feature = "rustc-dep-of-std",
diff --git a/src/unix/bsd/apple/b32.rs b/src/unix/bsd/apple/b32.rs
index c05de30327..0afda1c238 100644
--- a/src/unix/bsd/apple/b32.rs
+++ b/src/unix/bsd/apple/b32.rs
@@ -94,6 +94,11 @@ pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 12;
pub const TIOCTIMESTAMP: ::c_ulong = 0x40087459;
pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40087458;
+pub const BIOCSETF: ::c_ulong = 0x80084267;
+pub const BIOCSRTIMEOUT: ::c_ulong = 0x8008426d;
+pub const BIOCGRTIMEOUT: ::c_ulong = 0x4008426e;
+pub const BIOCSETFNR: ::c_ulong = 0x8008427e;
+
extern {
pub fn exchangedata(path1: *const ::c_char,
path2: *const ::c_char,
diff --git a/src/unix/bsd/apple/b64.rs b/src/unix/bsd/apple/b64.rs
index 2749260b04..69bc0043be 100644
--- a/src/unix/bsd/apple/b64.rs
+++ b/src/unix/bsd/apple/b64.rs
@@ -99,6 +99,11 @@ pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 16;
pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459;
pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40107458;
+pub const BIOCSETF: ::c_ulong = 0x80104267;
+pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d;
+pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e;
+pub const BIOCSETFNR: ::c_ulong = 0x8010427e;
+
extern {
pub fn exchangedata(path1: *const ::c_char,
path2: *const ::c_char,
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs
index 904bfe00b0..6d0a5bfe32 100644
--- a/src/unix/bsd/apple/mod.rs
+++ b/src/unix/bsd/apple/mod.rs
@@ -1761,6 +1761,13 @@ pub const TIOCPTYGRANT: ::c_uint = 0x20007454;
pub const TIOCPTYGNAME: ::c_uint = 0x40807453;
pub const TIOCPTYUNLK: ::c_uint = 0x20007452;
+pub const BIOCGRSIG: ::c_ulong = 0x40044272;
+pub const BIOCSRSIG: ::c_ulong = 0x80044273;
+pub const BIOCSDLT: ::c_ulong = 0x80044278;
+pub const BIOCGSEESENT: ::c_ulong = 0x40044276;
+pub const BIOCSSEESENT: ::c_ulong = 0x80044277;
+pub const BIOCGDLTLIST: ::c_ulong = 0xc00c4279;
+
pub const FIODTYPE: ::c_ulong = 0x4004667a;
pub const B0: speed_t = 0;
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs
index 62d416406a..d534af9091 100644
--- a/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -569,6 +569,8 @@ pub const TIOCSIG: ::c_uint = 0x2004745f;
pub const TIOCM_DCD: ::c_int = 0x40;
pub const H4DISC: ::c_int = 0x7;
+pub const BIOCSETFNR: ::c_ulong = 0x80104282;
+
pub const FIONWRITE: ::c_ulong = 0x40046677;
pub const FIONSPACE: ::c_ulong = 0x40046676;
pub const FIOSEEKDATA: ::c_ulong = 0xc0086661;
diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs
index f937d772a9..2561e2504e 100644
--- a/src/unix/bsd/freebsdlike/mod.rs
+++ b/src/unix/bsd/freebsdlike/mod.rs
@@ -1009,6 +1009,16 @@ pub const SLIPDISC: ::c_int = 0x4;
pub const PPPDISC: ::c_int = 0x5;
pub const NETGRAPHDISC: ::c_int = 0x6;
+pub const BIOCGRSIG: ::c_ulong = 0x40044272;
+pub const BIOCSRSIG: ::c_ulong = 0x80044273;
+pub const BIOCSDLT: ::c_ulong = 0x80044278;
+pub const BIOCGSEESENT: ::c_ulong = 0x40044276;
+pub const BIOCSSEESENT: ::c_ulong = 0x80044277;
+pub const BIOCSETF: ::c_ulong = 0x80104267;
+pub const BIOCGDLTLIST: ::c_ulong = 0xc0104279;
+pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d;
+pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e;
+
pub const FIODTYPE: ::c_ulong = 0x4004667a;
pub const FIOGETLBA: ::c_ulong = 0x40046679;
pub const FIODGNAME: ::c_ulong = 0x80106678;
diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs
index ee644114a4..40b18c638d 100644
--- a/src/unix/bsd/mod.rs
+++ b/src/unix/bsd/mod.rs
@@ -436,6 +436,20 @@ pub const POLLWRNORM: ::c_short = 0x004;
pub const POLLRDBAND: ::c_short = 0x080;
pub const POLLWRBAND: ::c_short = 0x100;
+pub const BIOCGBLEN: ::c_ulong = 0x40044266;
+pub const BIOCSBLEN: ::c_ulong = 0xc0044266;
+pub const BIOCFLUSH: ::c_uint = 0x20004268;
+pub const BIOCPROMISC: ::c_uint = 0x20004269;
+pub const BIOCGDLT: ::c_ulong = 0x4004426a;
+pub const BIOCGETIF: ::c_ulong = 0x4020426b;
+pub const BIOCSETIF: ::c_ulong = 0x8020426c;
+pub const BIOCGSTATS: ::c_ulong = 0x4008426f;
+pub const BIOCIMMEDIATE: ::c_ulong = 0x80044270;
+pub const BIOCVERSION: ::c_ulong = 0x40044271;
+pub const BIOCGHDRCMPLT: ::c_ulong = 0x40044274;
+pub const BIOCSHDRCMPLT: ::c_ulong = 0x80044275;
+pub const SIOCGIFADDR: ::c_ulong = 0xc0206921;
+
f! {
pub fn CMSG_FIRSTHDR(mhdr: *const ::msghdr) -> *mut ::cmsghdr {
if (*mhdr).msg_controllen as usize >= ::mem::size_of::<::cmsghdr>() {
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs
index c4e03adea7..9401c024bf 100644
--- a/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -1077,6 +1077,12 @@ pub const FD_SETSIZE: usize = 0x100;
pub const ST_NOSUID: ::c_ulong = 8;
+pub const BIOCGRSIG: ::c_ulong = 0x40044272;
+pub const BIOCSRSIG: ::c_ulong = 0x80044273;
+pub const BIOCSDLT: ::c_ulong = 0x80044278;
+pub const BIOCGSEESENT: ::c_ulong = 0x40044276;
+pub const BIOCSSEESENT: ::c_ulong = 0x80044277;
+
cfg_if! {
if #[cfg(any(target_arch = "sparc", target_arch = "sparc64",
target_arch = "x86", target_arch = "x86_64"))] {
diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs
index a8c5252efe..ab65a6de98 100644
--- a/src/unix/bsd/netbsdlike/openbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs
@@ -1310,6 +1310,10 @@ pub const SOCK_CLOEXEC: ::c_int = 0x8000;
pub const SOCK_NONBLOCK: ::c_int = 0x4000;
pub const SOCK_DNS: ::c_int = 0x1000;
+pub const BIOCGRSIG: ::c_ulong = 0x40044273;
+pub const BIOCSRSIG: ::c_ulong = 0x80044272;
+pub const BIOCSDLT: ::c_ulong = 0x8004427a;
+
pub const PTRACE_FORK: ::c_int = 0x0002;
pub const WCONTINUED: ::c_int = 8;
diff --git a/src/unix/linux_like/linux/musl/b64/aarch64.rs b/src/unix/linux_like/linux/musl/b64/aarch64.rs
index 14405a5ad0..a6d68c8a82 100644
--- a/src/unix/linux_like/linux/musl/b64/aarch64.rs
+++ b/src/unix/linux_like/linux/musl/b64/aarch64.rs
@@ -49,6 +49,36 @@ s! {
__unused: [::c_uint; 2],
}
+ pub struct statfs {
+ pub f_type: ::c_ulong,
+ pub f_bsize: ::c_ulong,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+ pub f_namelen: ::c_ulong,
+ pub f_frsize: ::c_ulong,
+ pub f_flags: ::c_ulong,
+ pub f_spare: [::c_ulong; 4],
+ }
+
+ pub struct statfs64 {
+ pub f_type: ::c_ulong,
+ pub f_bsize: ::c_ulong,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+ pub f_namelen: ::c_ulong,
+ pub f_frsize: ::c_ulong,
+ pub f_flags: ::c_ulong,
+ pub f_spare: [::c_ulong; 4],
+ }
+
pub struct ipc_perm {
pub __ipc_perm_key: ::key_t,
pub uid: ::uid_t,
@@ -62,15 +92,36 @@ s! {
}
}
+pub const O_ASYNC: ::c_int = 0x2000;
+pub const O_APPEND: ::c_int = 1024;
+pub const O_CREAT: ::c_int = 64;
+pub const O_EXCL: ::c_int = 128;
+pub const O_NOCTTY: ::c_int = 256;
+pub const O_NONBLOCK: ::c_int = 2048;
+pub const O_SYNC: ::c_int = 1052672;
+pub const O_RSYNC: ::c_int = 1052672;
+pub const O_DSYNC: ::c_int = 4096;
pub const O_DIRECT: ::c_int = 0x10000;
pub const O_DIRECTORY: ::c_int = 0x4000;
pub const O_LARGEFILE: ::c_int = 0x20000;
pub const O_NOFOLLOW: ::c_int = 0x8000;
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
pub const MINSIGSTKSZ: ::size_t = 6144;
pub const SIGSTKSZ: ::size_t = 12288;
pub const MADV_SOFT_OFFLINE: ::c_int = 101;
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+pub const MAP_DENYWRITE: ::c_int = 0x0800;
+pub const MAP_EXECUTABLE: ::c_int = 0x01000;
+pub const MAP_LOCKED: ::c_int = 0x02000;
+pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_POPULATE: ::c_int = 0x08000;
+pub const MAP_NONBLOCK: ::c_int = 0x010000;
+pub const MAP_STACK: ::c_int = 0x020000;
+pub const MAP_HUGETLB: ::c_int = 0x040000;
pub const SYS_io_setup: ::c_long = 0;
pub const SYS_io_destroy: ::c_long = 1;
pub const SYS_io_submit: ::c_long = 2;
@@ -341,6 +392,87 @@ pub const SYS_pkey_mprotect: ::c_long = 288;
pub const SYS_pkey_alloc: ::c_long = 289;
pub const SYS_pkey_free: ::c_long = 290;
+pub const ENAMETOOLONG: ::c_int = 36;
+pub const ENOLCK: ::c_int = 37;
+pub const ENOSYS: ::c_int = 38;
+pub const ENOTEMPTY: ::c_int = 39;
+pub const ELOOP: ::c_int = 40;
+pub const ENOMSG: ::c_int = 42;
+pub const EIDRM: ::c_int = 43;
+pub const ECHRNG: ::c_int = 44;
+pub const EL2NSYNC: ::c_int = 45;
+pub const EL3HLT: ::c_int = 46;
+pub const EL3RST: ::c_int = 47;
+pub const ELNRNG: ::c_int = 48;
+pub const EUNATCH: ::c_int = 49;
+pub const ENOCSI: ::c_int = 50;
+pub const EL2HLT: ::c_int = 51;
+pub const EBADE: ::c_int = 52;
+pub const EBADR: ::c_int = 53;
+pub const EXFULL: ::c_int = 54;
+pub const ENOANO: ::c_int = 55;
+pub const EBADRQC: ::c_int = 56;
+pub const EBADSLT: ::c_int = 57;
+pub const EMULTIHOP: ::c_int = 72;
+pub const EBADMSG: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 75;
+pub const ENOTUNIQ: ::c_int = 76;
+pub const EBADFD: ::c_int = 77;
+pub const EREMCHG: ::c_int = 78;
+pub const ELIBACC: ::c_int = 79;
+pub const ELIBBAD: ::c_int = 80;
+pub const ELIBSCN: ::c_int = 81;
+pub const ELIBMAX: ::c_int = 82;
+pub const ELIBEXEC: ::c_int = 83;
+pub const EILSEQ: ::c_int = 84;
+pub const ERESTART: ::c_int = 85;
+pub const ESTRPIPE: ::c_int = 86;
+pub const EUSERS: ::c_int = 87;
+pub const ENOTSOCK: ::c_int = 88;
+pub const EDESTADDRREQ: ::c_int = 89;
+pub const EMSGSIZE: ::c_int = 90;
+pub const EPROTOTYPE: ::c_int = 91;
+pub const ENOPROTOOPT: ::c_int = 92;
+pub const EPROTONOSUPPORT: ::c_int = 93;
+pub const ESOCKTNOSUPPORT: ::c_int = 94;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const EAFNOSUPPORT: ::c_int = 97;
+pub const EADDRINUSE: ::c_int = 98;
+pub const EADDRNOTAVAIL: ::c_int = 99;
+pub const ENETDOWN: ::c_int = 100;
+
+pub const F_GETLK: ::c_int = 5;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+pub const F_SETOWN: ::c_int = 8;
+
+pub const SIGCHLD: ::c_int = 17;
+pub const SIGBUS: ::c_int = 7;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
+pub const SIGUSR1: ::c_int = 10;
+pub const SIGUSR2: ::c_int = 12;
+pub const SIGCONT: ::c_int = 18;
+pub const SIGSTOP: ::c_int = 19;
+pub const SIGTSTP: ::c_int = 20;
+pub const SIGURG: ::c_int = 23;
+pub const SIGIO: ::c_int = 29;
+pub const SIGSYS: ::c_int = 31;
+pub const SIGSTKFLT: ::c_int = 16;
+pub const SIGPOLL: ::c_int = 29;
+pub const SIGPWR: ::c_int = 30;
+pub const SIG_SETMASK: ::c_int = 2;
+pub const SIG_BLOCK: ::c_int = 0x000000;
+pub const SIG_UNBLOCK: ::c_int = 0x01;
+
pub const RLIMIT_NLIMITS: ::c_int = 15;
pub const TIOCINQ: ::c_int = ::FIONREAD;
pub const MCL_CURRENT: ::c_int = 0x0001;
@@ -417,6 +549,31 @@ pub const FIONCLEX: ::c_int = 0x5450;
pub const FIONBIO: ::c_int = 0x5421;
pub const EDEADLK: ::c_int = 35;
pub const EDEADLOCK: ::c_int = EDEADLK;
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+pub const SOL_SOCKET: ::c_int = 1;
+pub const SO_REUSEADDR: ::c_int = 2;
+pub const SO_TYPE: ::c_int = 3;
+pub const SO_ERROR: ::c_int = 4;
+pub const SO_DONTROUTE: ::c_int = 5;
+pub const SO_BROADCAST: ::c_int = 6;
+pub const SO_SNDBUF: ::c_int = 7;
+pub const SO_RCVBUF: ::c_int = 8;
+pub const SO_KEEPALIVE: ::c_int = 9;
+pub const SO_OOBINLINE: ::c_int = 10;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_LINGER: ::c_int = 13;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_REUSEPORT: ::c_int = 15;
+pub const SO_ACCEPTCONN: ::c_int = 30;
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
pub const SO_PASSCRED: ::c_int = 16;
pub const SO_PEERCRED: ::c_int = 17;
pub const SO_RCVLOWAT: ::c_int = 18;
@@ -424,6 +581,7 @@ pub const SO_SNDLOWAT: ::c_int = 19;
pub const SO_RCVTIMEO: ::c_int = 20;
pub const SO_SNDTIMEO: ::c_int = 21;
pub const EXTPROC: ::tcflag_t = 0x00010000;
+pub const VEOF: usize = 4;
pub const VEOL: usize = 11;
pub const VEOL2: usize = 16;
pub const VMIN: usize = 6;
@@ -476,6 +634,8 @@ pub const TIOCM_DSR: ::c_int = 0x100;
pub const TIOCM_CD: ::c_int = TIOCM_CAR;
pub const TIOCM_RI: ::c_int = TIOCM_RNG;
+pub const EHWPOISON: ::c_int = 133;
+
extern {
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
}
diff --git a/src/unix/linux_like/linux/musl/b64/mips64.rs b/src/unix/linux_like/linux/musl/b64/mips64.rs
new file mode 100644
index 0000000000..4324421460
--- /dev/null
+++ b/src/unix/linux_like/linux/musl/b64/mips64.rs
@@ -0,0 +1,753 @@
+pub type c_char = i8;
+pub type wchar_t = i32;
+pub type __u64 = ::c_ulong;
+pub type nlink_t = u64;
+pub type blksize_t = i64;
+
+s! {
+ pub struct stat {
+ pub st_dev: ::dev_t,
+ __pad1: [::c_int; 3],
+ pub st_ino: ::ino_t,
+ pub st_mode: ::mode_t,
+ pub st_nlink: ::nlink_t,
+ pub st_uid: ::uid_t,
+ pub st_gid: ::gid_t,
+ pub st_rdev: ::dev_t,
+ __pad2: [::c_uint; 2],
+ pub st_size: ::off_t,
+ __pad3: ::c_int,
+ pub st_atime: ::time_t,
+ pub st_atime_nsec: ::c_long,
+ pub st_mtime: ::time_t,
+ pub st_mtime_nsec: ::c_long,
+ pub st_ctime: ::time_t,
+ pub st_ctime_nsec: ::c_long,
+ pub st_blksize: ::blksize_t,
+ __pad4: ::c_uint,
+ pub st_blocks: ::blkcnt_t,
+ __pad5: [::c_int; 14],
+ }
+
+ pub struct stat64 {
+ pub st_dev: ::dev_t,
+ __pad1: [::c_int; 3],
+ pub st_ino: ::ino_t,
+ pub st_mode: ::mode_t,
+ pub st_nlink: ::nlink_t,
+ pub st_uid: ::uid_t,
+ pub st_gid: ::gid_t,
+ pub st_rdev: ::dev_t,
+ __pad2: [::c_uint; 2],
+ pub st_size: ::off_t,
+ __pad3: ::c_int,
+ pub st_atime: ::time_t,
+ pub st_atime_nsec: ::c_long,
+ pub st_mtime: ::time_t,
+ pub st_mtime_nsec: ::c_long,
+ pub st_ctime: ::time_t,
+ pub st_ctime_nsec: ::c_long,
+ pub st_blksize: ::blksize_t,
+ __pad4: ::c_uint,
+ pub st_blocks: ::blkcnt_t,
+ __pad5: [::c_int; 14],
+ }
+
+ pub struct statfs {
+ pub f_type: ::c_ulong,
+ pub f_bsize: ::c_ulong,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+ pub f_namelen: ::c_ulong,
+ pub f_frsize: ::c_ulong,
+ pub f_flags: ::c_ulong,
+ pub f_spare: [::c_ulong; 5],
+ }
+
+ pub struct statfs64 {
+ pub f_type: ::c_ulong,
+ pub f_bsize: ::c_ulong,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+ pub f_namelen: ::c_ulong,
+ pub f_frsize: ::c_ulong,
+ pub f_flags: ::c_ulong,
+ pub f_spare: [::c_ulong; 5],
+ }
+
+ pub struct ipc_perm {
+ pub __ipc_perm_key: ::key_t,
+ pub uid: ::uid_t,
+ pub gid: ::gid_t,
+ pub cuid: ::uid_t,
+ pub cgid: ::gid_t,
+ pub mode: ::mode_t,
+ pub __seq: ::c_int,
+ __pad1: ::c_int,
+ __unused1: ::c_ulong,
+ __unused2: ::c_ulong
+ }
+}
+
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const MINSIGSTKSZ: ::size_t = 2048;
+
+pub const SYS_read: ::c_long = 5000 + 0;
+pub const SYS_write: ::c_long = 5000 + 1;
+pub const SYS_open: ::c_long = 5000 + 2;
+pub const SYS_close: ::c_long = 5000 + 3;
+pub const SYS_stat: ::c_long = 5000 + 4;
+pub const SYS_fstat: ::c_long = 5000 + 5;
+pub const SYS_lstat: ::c_long = 5000 + 6;
+pub const SYS_poll: ::c_long = 5000 + 7;
+pub const SYS_lseek: ::c_long = 5000 + 8;
+pub const SYS_mmap: ::c_long = 5000 + 9;
+pub const SYS_mprotect: ::c_long = 5000 + 10;
+pub const SYS_munmap: ::c_long = 5000 + 11;
+pub const SYS_brk: ::c_long = 5000 + 12;
+pub const SYS_rt_sigaction: ::c_long = 5000 + 13;
+pub const SYS_rt_sigprocmask: ::c_long = 5000 + 14;
+pub const SYS_ioctl: ::c_long = 5000 + 15;
+pub const SYS_pread64: ::c_long = 5000 + 16;
+pub const SYS_pwrite64: ::c_long = 5000 + 17;
+pub const SYS_readv: ::c_long = 5000 + 18;
+pub const SYS_writev: ::c_long = 5000 + 19;
+pub const SYS_access: ::c_long = 5000 + 20;
+pub const SYS_pipe: ::c_long = 5000 + 21;
+pub const SYS__newselect: ::c_long = 5000 + 22;
+pub const SYS_sched_yield: ::c_long = 5000 + 23;
+pub const SYS_mremap: ::c_long = 5000 + 24;
+pub const SYS_msync: ::c_long = 5000 + 25;
+pub const SYS_mincore: ::c_long = 5000 + 26;
+pub const SYS_madvise: ::c_long = 5000 + 27;
+pub const SYS_shmget: ::c_long = 5000 + 28;
+pub const SYS_shmat: ::c_long = 5000 + 29;
+pub const SYS_shmctl: ::c_long = 5000 + 30;
+pub const SYS_dup: ::c_long = 5000 + 31;
+pub const SYS_dup2: ::c_long = 5000 + 32;
+pub const SYS_pause: ::c_long = 5000 + 33;
+pub const SYS_nanosleep: ::c_long = 5000 + 34;
+pub const SYS_getitimer: ::c_long = 5000 + 35;
+pub const SYS_setitimer: ::c_long = 5000 + 36;
+pub const SYS_alarm: ::c_long = 5000 + 37;
+pub const SYS_getpid: ::c_long = 5000 + 38;
+pub const SYS_sendfile: ::c_long = 5000 + 39;
+pub const SYS_socket: ::c_long = 5000 + 40;
+pub const SYS_connect: ::c_long = 5000 + 41;
+pub const SYS_accept: ::c_long = 5000 + 42;
+pub const SYS_sendto: ::c_long = 5000 + 43;
+pub const SYS_recvfrom: ::c_long = 5000 + 44;
+pub const SYS_sendmsg: ::c_long = 5000 + 45;
+pub const SYS_recvmsg: ::c_long = 5000 + 46;
+pub const SYS_shutdown: ::c_long = 5000 + 47;
+pub const SYS_bind: ::c_long = 5000 + 48;
+pub const SYS_listen: ::c_long = 5000 + 49;
+pub const SYS_getsockname: ::c_long = 5000 + 50;
+pub const SYS_getpeername: ::c_long = 5000 + 51;
+pub const SYS_socketpair: ::c_long = 5000 + 52;
+pub const SYS_setsockopt: ::c_long = 5000 + 53;
+pub const SYS_getsockopt: ::c_long = 5000 + 54;
+pub const SYS_clone: ::c_long = 5000 + 55;
+pub const SYS_fork: ::c_long = 5000 + 56;
+pub const SYS_execve: ::c_long = 5000 + 57;
+pub const SYS_exit: ::c_long = 5000 + 58;
+pub const SYS_wait4: ::c_long = 5000 + 59;
+pub const SYS_kill: ::c_long = 5000 + 60;
+pub const SYS_uname: ::c_long = 5000 + 61;
+pub const SYS_semget: ::c_long = 5000 + 62;
+pub const SYS_semop: ::c_long = 5000 + 63;
+pub const SYS_semctl: ::c_long = 5000 + 64;
+pub const SYS_shmdt: ::c_long = 5000 + 65;
+pub const SYS_msgget: ::c_long = 5000 + 66;
+pub const SYS_msgsnd: ::c_long = 5000 + 67;
+pub const SYS_msgrcv: ::c_long = 5000 + 68;
+pub const SYS_msgctl: ::c_long = 5000 + 69;
+pub const SYS_fcntl: ::c_long = 5000 + 70;
+pub const SYS_flock: ::c_long = 5000 + 71;
+pub const SYS_fsync: ::c_long = 5000 + 72;
+pub const SYS_fdatasync: ::c_long = 5000 + 73;
+pub const SYS_truncate: ::c_long = 5000 + 74;
+pub const SYS_ftruncate: ::c_long = 5000 + 75;
+pub const SYS_getdents: ::c_long = 5000 + 76;
+pub const SYS_getcwd: ::c_long = 5000 + 77;
+pub const SYS_chdir: ::c_long = 5000 + 78;
+pub const SYS_fchdir: ::c_long = 5000 + 79;
+pub const SYS_rename: ::c_long = 5000 + 80;
+pub const SYS_mkdir: ::c_long = 5000 + 81;
+pub const SYS_rmdir: ::c_long = 5000 + 82;
+pub const SYS_creat: ::c_long = 5000 + 83;
+pub const SYS_link: ::c_long = 5000 + 84;
+pub const SYS_unlink: ::c_long = 5000 + 85;
+pub const SYS_symlink: ::c_long = 5000 + 86;
+pub const SYS_readlink: ::c_long = 5000 + 87;
+pub const SYS_chmod: ::c_long = 5000 + 88;
+pub const SYS_fchmod: ::c_long = 5000 + 89;
+pub const SYS_chown: ::c_long = 5000 + 90;
+pub const SYS_fchown: ::c_long = 5000 + 91;
+pub const SYS_lchown: ::c_long = 5000 + 92;
+pub const SYS_umask: ::c_long = 5000 + 93;
+pub const SYS_gettimeofday: ::c_long = 5000 + 94;
+pub const SYS_getrlimit: ::c_long = 5000 + 95;
+pub const SYS_getrusage: ::c_long = 5000 + 96;
+pub const SYS_sysinfo: ::c_long = 5000 + 97;
+pub const SYS_times: ::c_long = 5000 + 98;
+pub const SYS_ptrace: ::c_long = 5000 + 99;
+pub const SYS_getuid: ::c_long = 5000 + 100;
+pub const SYS_syslog: ::c_long = 5000 + 101;
+pub const SYS_getgid: ::c_long = 5000 + 102;
+pub const SYS_setuid: ::c_long = 5000 + 103;
+pub const SYS_setgid: ::c_long = 5000 + 104;
+pub const SYS_geteuid: ::c_long = 5000 + 105;
+pub const SYS_getegid: ::c_long = 5000 + 106;
+pub const SYS_setpgid: ::c_long = 5000 + 107;
+pub const SYS_getppid: ::c_long = 5000 + 108;
+pub const SYS_getpgrp: ::c_long = 5000 + 109;
+pub const SYS_setsid: ::c_long = 5000 + 110;
+pub const SYS_setreuid: ::c_long = 5000 + 111;
+pub const SYS_setregid: ::c_long = 5000 + 112;
+pub const SYS_getgroups: ::c_long = 5000 + 113;
+pub const SYS_setgroups: ::c_long = 5000 + 114;
+pub const SYS_setresuid: ::c_long = 5000 + 115;
+pub const SYS_getresuid: ::c_long = 5000 + 116;
+pub const SYS_setresgid: ::c_long = 5000 + 117;
+pub const SYS_getresgid: ::c_long = 5000 + 118;
+pub const SYS_getpgid: ::c_long = 5000 + 119;
+pub const SYS_setfsuid: ::c_long = 5000 + 120;
+pub const SYS_setfsgid: ::c_long = 5000 + 121;
+pub const SYS_getsid: ::c_long = 5000 + 122;
+pub const SYS_capget: ::c_long = 5000 + 123;
+pub const SYS_capset: ::c_long = 5000 + 124;
+pub const SYS_rt_sigpending: ::c_long = 5000 + 125;
+pub const SYS_rt_sigtimedwait: ::c_long = 5000 + 126;
+pub const SYS_rt_sigqueueinfo: ::c_long = 5000 + 127;
+pub const SYS_rt_sigsuspend: ::c_long = 5000 + 128;
+pub const SYS_sigaltstack: ::c_long = 5000 + 129;
+pub const SYS_utime: ::c_long = 5000 + 130;
+pub const SYS_mknod: ::c_long = 5000 + 131;
+pub const SYS_personality: ::c_long = 5000 + 132;
+pub const SYS_ustat: ::c_long = 5000 + 133;
+pub const SYS_statfs: ::c_long = 5000 + 134;
+pub const SYS_fstatfs: ::c_long = 5000 + 135;
+pub const SYS_sysfs: ::c_long = 5000 + 136;
+pub const SYS_getpriority: ::c_long = 5000 + 137;
+pub const SYS_setpriority: ::c_long = 5000 + 138;
+pub const SYS_sched_setparam: ::c_long = 5000 + 139;
+pub const SYS_sched_getparam: ::c_long = 5000 + 140;
+pub const SYS_sched_setscheduler: ::c_long = 5000 + 141;
+pub const SYS_sched_getscheduler: ::c_long = 5000 + 142;
+pub const SYS_sched_get_priority_max: ::c_long = 5000 + 143;
+pub const SYS_sched_get_priority_min: ::c_long = 5000 + 144;
+pub const SYS_sched_rr_get_interval: ::c_long = 5000 + 145;
+pub const SYS_mlock: ::c_long = 5000 + 146;
+pub const SYS_munlock: ::c_long = 5000 + 147;
+pub const SYS_mlockall: ::c_long = 5000 + 148;
+pub const SYS_munlockall: ::c_long = 5000 + 149;
+pub const SYS_vhangup: ::c_long = 5000 + 150;
+pub const SYS_pivot_root: ::c_long = 5000 + 151;
+pub const SYS__sysctl: ::c_long = 5000 + 152;
+pub const SYS_prctl: ::c_long = 5000 + 153;
+pub const SYS_adjtimex: ::c_long = 5000 + 154;
+pub const SYS_setrlimit: ::c_long = 5000 + 155;
+pub const SYS_chroot: ::c_long = 5000 + 156;
+pub const SYS_sync: ::c_long = 5000 + 157;
+pub const SYS_acct: ::c_long = 5000 + 158;
+pub const SYS_settimeofday: ::c_long = 5000 + 159;
+pub const SYS_mount: ::c_long = 5000 + 160;
+pub const SYS_umount2: ::c_long = 5000 + 161;
+pub const SYS_swapon: ::c_long = 5000 + 162;
+pub const SYS_swapoff: ::c_long = 5000 + 163;
+pub const SYS_reboot: ::c_long = 5000 + 164;
+pub const SYS_sethostname: ::c_long = 5000 + 165;
+pub const SYS_setdomainname: ::c_long = 5000 + 166;
+pub const SYS_create_module: ::c_long = 5000 + 167;
+pub const SYS_init_module: ::c_long = 5000 + 168;
+pub const SYS_delete_module: ::c_long = 5000 + 169;
+pub const SYS_get_kernel_syms: ::c_long = 5000 + 170;
+pub const SYS_query_module: ::c_long = 5000 + 171;
+pub const SYS_quotactl: ::c_long = 5000 + 172;
+pub const SYS_nfsservctl: ::c_long = 5000 + 173;
+pub const SYS_getpmsg: ::c_long = 5000 + 174;
+pub const SYS_putpmsg: ::c_long = 5000 + 175;
+pub const SYS_afs_syscall: ::c_long = 5000 + 176;
+pub const SYS_gettid: ::c_long = 5000 + 178;
+pub const SYS_readahead: ::c_long = 5000 + 179;
+pub const SYS_setxattr: ::c_long = 5000 + 180;
+pub const SYS_lsetxattr: ::c_long = 5000 + 181;
+pub const SYS_fsetxattr: ::c_long = 5000 + 182;
+pub const SYS_getxattr: ::c_long = 5000 + 183;
+pub const SYS_lgetxattr: ::c_long = 5000 + 184;
+pub const SYS_fgetxattr: ::c_long = 5000 + 185;
+pub const SYS_listxattr: ::c_long = 5000 + 186;
+pub const SYS_llistxattr: ::c_long = 5000 + 187;
+pub const SYS_flistxattr: ::c_long = 5000 + 188;
+pub const SYS_removexattr: ::c_long = 5000 + 189;
+pub const SYS_lremovexattr: ::c_long = 5000 + 190;
+pub const SYS_fremovexattr: ::c_long = 5000 + 191;
+pub const SYS_tkill: ::c_long = 5000 + 192;
+pub const SYS_futex: ::c_long = 5000 + 194;
+pub const SYS_sched_setaffinity: ::c_long = 5000 + 195;
+pub const SYS_sched_getaffinity: ::c_long = 5000 + 196;
+pub const SYS_cacheflush: ::c_long = 5000 + 197;
+pub const SYS_cachectl: ::c_long = 5000 + 198;
+pub const SYS_sysmips: ::c_long = 5000 + 199;
+pub const SYS_io_setup: ::c_long = 5000 + 200;
+pub const SYS_io_destroy: ::c_long = 5000 + 201;
+pub const SYS_io_getevents: ::c_long = 5000 + 202;
+pub const SYS_io_submit: ::c_long = 5000 + 203;
+pub const SYS_io_cancel: ::c_long = 5000 + 204;
+pub const SYS_exit_group: ::c_long = 5000 + 205;
+pub const SYS_lookup_dcookie: ::c_long = 5000 + 206;
+pub const SYS_epoll_create: ::c_long = 5000 + 207;
+pub const SYS_epoll_ctl: ::c_long = 5000 + 208;
+pub const SYS_epoll_wait: ::c_long = 5000 + 209;
+pub const SYS_remap_file_pages: ::c_long = 5000 + 210;
+pub const SYS_rt_sigreturn: ::c_long = 5000 + 211;
+pub const SYS_set_tid_address: ::c_long = 5000 + 212;
+pub const SYS_restart_syscall: ::c_long = 5000 + 213;
+pub const SYS_semtimedop: ::c_long = 5000 + 214;
+pub const SYS_fadvise64: ::c_long = 5000 + 215;
+pub const SYS_timer_create: ::c_long = 5000 + 216;
+pub const SYS_timer_settime: ::c_long = 5000 + 217;
+pub const SYS_timer_gettime: ::c_long = 5000 + 218;
+pub const SYS_timer_getoverrun: ::c_long = 5000 + 219;
+pub const SYS_timer_delete: ::c_long = 5000 + 220;
+pub const SYS_clock_settime: ::c_long = 5000 + 221;
+pub const SYS_clock_gettime: ::c_long = 5000 + 222;
+pub const SYS_clock_getres: ::c_long = 5000 + 223;
+pub const SYS_clock_nanosleep: ::c_long = 5000 + 224;
+pub const SYS_tgkill: ::c_long = 5000 + 225;
+pub const SYS_utimes: ::c_long = 5000 + 226;
+pub const SYS_mbind: ::c_long = 5000 + 227;
+pub const SYS_get_mempolicy: ::c_long = 5000 + 228;
+pub const SYS_set_mempolicy: ::c_long = 5000 + 229;
+pub const SYS_mq_open: ::c_long = 5000 + 230;
+pub const SYS_mq_unlink: ::c_long = 5000 + 231;
+pub const SYS_mq_timedsend: ::c_long = 5000 + 232;
+pub const SYS_mq_timedreceive: ::c_long = 5000 + 233;
+pub const SYS_mq_notify: ::c_long = 5000 + 234;
+pub const SYS_mq_getsetattr: ::c_long = 5000 + 235;
+pub const SYS_vserver: ::c_long = 5000 + 236;
+pub const SYS_waitid: ::c_long = 5000 + 237;
+/* pub const SYS_sys_setaltroot: ::c_long = 5000 + 238; */
+pub const SYS_add_key: ::c_long = 5000 + 239;
+pub const SYS_request_key: ::c_long = 5000 + 240;
+pub const SYS_keyctl: ::c_long = 5000 + 241;
+pub const SYS_set_thread_area: ::c_long = 5000 + 242;
+pub const SYS_inotify_init: ::c_long = 5000 + 243;
+pub const SYS_inotify_add_watch: ::c_long = 5000 + 244;
+pub const SYS_inotify_rm_watch: ::c_long = 5000 + 245;
+pub const SYS_migrate_pages: ::c_long = 5000 + 246;
+pub const SYS_openat: ::c_long = 5000 + 247;
+pub const SYS_mkdirat: ::c_long = 5000 + 248;
+pub const SYS_mknodat: ::c_long = 5000 + 249;
+pub const SYS_fchownat: ::c_long = 5000 + 250;
+pub const SYS_futimesat: ::c_long = 5000 + 251;
+pub const SYS_newfstatat: ::c_long = 5000 + 252;
+pub const SYS_unlinkat: ::c_long = 5000 + 253;
+pub const SYS_renameat: ::c_long = 5000 + 254;
+pub const SYS_linkat: ::c_long = 5000 + 255;
+pub const SYS_symlinkat: ::c_long = 5000 + 256;
+pub const SYS_readlinkat: ::c_long = 5000 + 257;
+pub const SYS_fchmodat: ::c_long = 5000 + 258;
+pub const SYS_faccessat: ::c_long = 5000 + 259;
+pub const SYS_pselect6: ::c_long = 5000 + 260;
+pub const SYS_ppoll: ::c_long = 5000 + 261;
+pub const SYS_unshare: ::c_long = 5000 + 262;
+pub const SYS_splice: ::c_long = 5000 + 263;
+pub const SYS_sync_file_range: ::c_long = 5000 + 264;
+pub const SYS_tee: ::c_long = 5000 + 265;
+pub const SYS_vmsplice: ::c_long = 5000 + 266;
+pub const SYS_move_pages: ::c_long = 5000 + 267;
+pub const SYS_set_robust_list: ::c_long = 5000 + 268;
+pub const SYS_get_robust_list: ::c_long = 5000 + 269;
+pub const SYS_kexec_load: ::c_long = 5000 + 270;
+pub const SYS_getcpu: ::c_long = 5000 + 271;
+pub const SYS_epoll_pwait: ::c_long = 5000 + 272;
+pub const SYS_ioprio_set: ::c_long = 5000 + 273;
+pub const SYS_ioprio_get: ::c_long = 5000 + 274;
+pub const SYS_utimensat: ::c_long = 5000 + 275;
+pub const SYS_signalfd: ::c_long = 5000 + 276;
+pub const SYS_timerfd: ::c_long = 5000 + 277;
+pub const SYS_eventfd: ::c_long = 5000 + 278;
+pub const SYS_fallocate: ::c_long = 5000 + 279;
+pub const SYS_timerfd_create: ::c_long = 5000 + 280;
+pub const SYS_timerfd_gettime: ::c_long = 5000 + 281;
+pub const SYS_timerfd_settime: ::c_long = 5000 + 282;
+pub const SYS_signalfd4: ::c_long = 5000 + 283;
+pub const SYS_eventfd2: ::c_long = 5000 + 284;
+pub const SYS_epoll_create1: ::c_long = 5000 + 285;
+pub const SYS_dup3: ::c_long = 5000 + 286;
+pub const SYS_pipe2: ::c_long = 5000 + 287;
+pub const SYS_inotify_init1: ::c_long = 5000 + 288;
+pub const SYS_preadv: ::c_long = 5000 + 289;
+pub const SYS_pwritev: ::c_long = 5000 + 290;
+pub const SYS_rt_tgsigqueueinfo: ::c_long = 5000 + 291;
+pub const SYS_perf_event_open: ::c_long = 5000 + 292;
+pub const SYS_accept4: ::c_long = 5000 + 293;
+pub const SYS_recvmmsg: ::c_long = 5000 + 294;
+pub const SYS_fanotify_init: ::c_long = 5000 + 295;
+pub const SYS_fanotify_mark: ::c_long = 5000 + 296;
+pub const SYS_prlimit64: ::c_long = 5000 + 297;
+pub const SYS_name_to_handle_at: ::c_long = 5000 + 298;
+pub const SYS_open_by_handle_at: ::c_long = 5000 + 299;
+pub const SYS_clock_adjtime: ::c_long = 5000 + 300;
+pub const SYS_syncfs: ::c_long = 5000 + 301;
+pub const SYS_sendmmsg: ::c_long = 5000 + 302;
+pub const SYS_setns: ::c_long = 5000 + 303;
+pub const SYS_process_vm_readv: ::c_long = 5000 + 304;
+pub const SYS_process_vm_writev: ::c_long = 5000 + 305;
+pub const SYS_kcmp: ::c_long = 5000 + 306;
+pub const SYS_finit_module: ::c_long = 5000 + 307;
+pub const SYS_getdents64: ::c_long = 5000 + 308;
+pub const SYS_sched_setattr: ::c_long = 5000 + 309;
+pub const SYS_sched_getattr: ::c_long = 5000 + 310;
+pub const SYS_renameat2: ::c_long = 5000 + 311;
+pub const SYS_seccomp: ::c_long = 5000 + 312;
+pub const SYS_getrandom: ::c_long = 5000 + 313;
+pub const SYS_memfd_create: ::c_long = 5000 + 314;
+pub const SYS_bpf: ::c_long = 5000 + 315;
+pub const SYS_execveat: ::c_long = 5000 + 316;
+pub const SYS_userfaultfd: ::c_long = 5000 + 317;
+pub const SYS_membarrier: ::c_long = 5000 + 318;
+pub const SYS_mlock2: ::c_long = 5000 + 319;
+pub const SYS_copy_file_range: ::c_long = 5000 + 320;
+pub const SYS_preadv2: ::c_long = 5000 + 321;
+pub const SYS_pwritev2: ::c_long = 5000 + 322;
+pub const SYS_pkey_mprotect: ::c_long = 5000 + 323;
+pub const SYS_pkey_alloc: ::c_long = 5000 + 324;
+pub const SYS_pkey_free: ::c_long = 5000 + 325;
+
+pub const O_DIRECT: ::c_int = 0x8000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+
+pub const O_APPEND: ::c_int = 8;
+pub const O_CREAT: ::c_int = 256;
+pub const O_EXCL: ::c_int = 1024;
+pub const O_NOCTTY: ::c_int = 2048;
+pub const O_NONBLOCK: ::c_int = 128;
+pub const O_SYNC: ::c_int = 0x4010;
+pub const O_RSYNC: ::c_int = 0x4010;
+pub const O_DSYNC: ::c_int = 0x10;
+pub const O_ASYNC: ::c_int = 0x1000;
+
+pub const EDEADLK: ::c_int = 45;
+pub const ENAMETOOLONG: ::c_int = 78;
+pub const ENOLCK: ::c_int = 46;
+pub const ENOSYS: ::c_int = 89;
+pub const ENOTEMPTY: ::c_int = 93;
+pub const ELOOP: ::c_int = 90;
+pub const ENOMSG: ::c_int = 35;
+pub const EIDRM: ::c_int = 36;
+pub const ECHRNG: ::c_int = 37;
+pub const EL2NSYNC: ::c_int = 38;
+pub const EL3HLT: ::c_int = 39;
+pub const EL3RST: ::c_int = 40;
+pub const ELNRNG: ::c_int = 41;
+pub const EUNATCH: ::c_int = 42;
+pub const ENOCSI: ::c_int = 43;
+pub const EL2HLT: ::c_int = 44;
+pub const EBADE: ::c_int = 50;
+pub const EBADR: ::c_int = 51;
+pub const EXFULL: ::c_int = 52;
+pub const ENOANO: ::c_int = 53;
+pub const EBADRQC: ::c_int = 54;
+pub const EBADSLT: ::c_int = 55;
+pub const EDEADLOCK: ::c_int = 56;
+pub const EMULTIHOP: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 79;
+pub const ENOTUNIQ: ::c_int = 80;
+pub const EBADFD: ::c_int = 81;
+pub const EBADMSG: ::c_int = 77;
+pub const EREMCHG: ::c_int = 82;
+pub const ELIBACC: ::c_int = 83;
+pub const ELIBBAD: ::c_int = 84;
+pub const ELIBSCN: ::c_int = 85;
+pub const ELIBMAX: ::c_int = 86;
+pub const ELIBEXEC: ::c_int = 87;
+pub const EILSEQ: ::c_int = 88;
+pub const ERESTART: ::c_int = 91;
+pub const ESTRPIPE: ::c_int = 92;
+pub const EUSERS: ::c_int = 94;
+pub const ENOTSOCK: ::c_int = 95;
+pub const EDESTADDRREQ: ::c_int = 96;
+pub const EMSGSIZE: ::c_int = 97;
+pub const EPROTOTYPE: ::c_int = 98;
+pub const ENOPROTOOPT: ::c_int = 99;
+pub const EPROTONOSUPPORT: ::c_int = 120;
+pub const ESOCKTNOSUPPORT: ::c_int = 121;
+pub const EOPNOTSUPP: ::c_int = 122;
+pub const EPFNOSUPPORT: ::c_int = 123;
+pub const EAFNOSUPPORT: ::c_int = 124;
+pub const EADDRINUSE: ::c_int = 125;
+pub const EADDRNOTAVAIL: ::c_int = 126;
+pub const ENETDOWN: ::c_int = 127;
+pub const ENETUNREACH: ::c_int = 128;
+pub const ENETRESET: ::c_int = 129;
+pub const ECONNABORTED: ::c_int = 130;
+pub const ECONNRESET: ::c_int = 131;
+pub const ENOBUFS: ::c_int = 132;
+pub const EISCONN: ::c_int = 133;
+pub const ENOTCONN: ::c_int = 134;
+pub const ESHUTDOWN: ::c_int = 143;
+pub const ETOOMANYREFS: ::c_int = 144;
+pub const ETIMEDOUT: ::c_int = 145;
+pub const ECONNREFUSED: ::c_int = 146;
+pub const EHOSTDOWN: ::c_int = 147;
+pub const EHOSTUNREACH: ::c_int = 148;
+pub const EALREADY: ::c_int = 149;
+pub const EINPROGRESS: ::c_int = 150;
+pub const ESTALE: ::c_int = 151;
+pub const EUCLEAN: ::c_int = 135;
+pub const ENOTNAM: ::c_int = 137;
+pub const ENAVAIL: ::c_int = 138;
+pub const EISNAM: ::c_int = 139;
+pub const EREMOTEIO: ::c_int = 140;
+pub const EDQUOT: ::c_int = 1133;
+pub const ENOMEDIUM: ::c_int = 159;
+pub const EMEDIUMTYPE: ::c_int = 160;
+pub const ECANCELED: ::c_int = 158;
+pub const ENOKEY: ::c_int = 161;
+pub const EKEYEXPIRED: ::c_int = 162;
+pub const EKEYREVOKED: ::c_int = 163;
+pub const EKEYREJECTED: ::c_int = 164;
+pub const EOWNERDEAD: ::c_int = 165;
+pub const ENOTRECOVERABLE: ::c_int = 166;
+pub const ERFKILL: ::c_int = 167;
+
+pub const MAP_NORESERVE: ::c_int = 0x400;
+pub const MAP_ANON: ::c_int = 0x800;
+pub const MAP_GROWSDOWN: ::c_int = 0x1000;
+pub const MAP_DENYWRITE: ::c_int = 0x2000;
+pub const MAP_EXECUTABLE: ::c_int = 0x4000;
+pub const MAP_LOCKED: ::c_int = 0x8000;
+pub const MAP_POPULATE: ::c_int = 0x10000;
+pub const MAP_NONBLOCK: ::c_int = 0x20000;
+pub const MAP_STACK: ::c_int = 0x40000;
+pub const MAP_HUGETLB: ::c_int = 0x080000;
+
+pub const SOCK_STREAM: ::c_int = 2;
+pub const SOCK_DGRAM: ::c_int = 1;
+
+pub const SOL_SOCKET: ::c_int = 0xffff;
+
+pub const SO_REUSEADDR: ::c_int = 0x0004;
+pub const SO_KEEPALIVE: ::c_int = 0x0008;
+pub const SO_DONTROUTE: ::c_int = 0x0010;
+pub const SO_BROADCAST: ::c_int = 0x0020;
+pub const SO_LINGER: ::c_int = 0x0080;
+pub const SO_OOBINLINE: ::c_int = 0x0100;
+pub const SO_REUSEPORT: ::c_int = 0x0200;
+pub const SO_TYPE: ::c_int = 0x1008;
+pub const SO_ERROR: ::c_int = 0x1007;
+pub const SO_SNDBUF: ::c_int = 0x1001;
+pub const SO_RCVBUF: ::c_int = 0x1002;
+pub const SO_SNDLOWAT: ::c_int = 0x1003;
+pub const SO_RCVLOWAT: ::c_int = 0x1004;
+pub const SO_SNDTIMEO: ::c_int = 0x1005;
+pub const SO_RCVTIMEO: ::c_int = 0x1006;
+pub const SO_ACCEPTCONN: ::c_int = 0x1009;
+pub const SO_PROTOCOL: ::c_int = 0x1028;
+pub const SO_DOMAIN: ::c_int = 0x1029;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_PASSCRED: ::c_int = 17;
+pub const SO_PEERCRED: ::c_int = 18;
+pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
+pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
+pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
+pub const SO_ATTACH_FILTER: ::c_int = 26;
+pub const SO_DETACH_FILTER: ::c_int = 27;
+pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
+pub const SO_PEERNAME: ::c_int = 28;
+pub const SO_PEERSEC: ::c_int = 30;
+pub const SO_SNDBUFFORCE: ::c_int = 31;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_PASSSEC: ::c_int = 34;
+pub const SO_TIMESTAMPNS: ::c_int = 35;
+pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
+pub const SO_WIFI_STATUS: ::c_int = 41;
+pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
+pub const SO_NOFCS: ::c_int = 43;
+pub const SO_LOCK_FILTER: ::c_int = 44;
+pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
+pub const SO_MAX_PACING_RATE: ::c_int = 47;
+pub const SO_BPF_EXTENSIONS: ::c_int = 48;
+pub const SO_INCOMING_CPU: ::c_int = 49;
+pub const SO_ATTACH_BPF: ::c_int = 50;
+pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
+
+pub const FIOCLEX: ::c_int = 0x6601;
+pub const FIONCLEX: ::c_int = 0x6602;
+pub const FIONBIO: ::c_int = 0x667e;
+
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000008;
+pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
+
+pub const SIGCHLD: ::c_int = 18;
+pub const SIGBUS: ::c_int = 10;
+pub const SIGTTIN: ::c_int = 26;
+pub const SIGTTOU: ::c_int = 27;
+pub const SIGXCPU: ::c_int = 30;
+pub const SIGXFSZ: ::c_int = 31;
+pub const SIGVTALRM: ::c_int = 28;
+pub const SIGPROF: ::c_int = 29;
+pub const SIGWINCH: ::c_int = 20;
+pub const SIGUSR1: ::c_int = 16;
+pub const SIGUSR2: ::c_int = 17;
+pub const SIGCONT: ::c_int = 25;
+pub const SIGSTOP: ::c_int = 23;
+pub const SIGTSTP: ::c_int = 24;
+pub const SIGURG: ::c_int = 21;
+pub const SIGIO: ::c_int = 22;
+pub const SIGSYS: ::c_int = 12;
+pub const SIGPOLL: ::c_int = 22;
+pub const SIGPWR: ::c_int = 19;
+pub const SIG_SETMASK: ::c_int = 3;
+pub const SIG_BLOCK: ::c_int = 0x1;
+pub const SIG_UNBLOCK: ::c_int = 0x2;
+
+pub const POLLWRNORM: ::c_short = 0x004;
+pub const POLLWRBAND: ::c_short = 0x100;
+
+pub const VEOF: usize = 16;
+pub const VEOL: usize = 17;
+pub const VEOL2: usize = 6;
+pub const VMIN: usize = 4;
+pub const IEXTEN: ::tcflag_t = 0x00000100;
+pub const TOSTOP: ::tcflag_t = 0x00008000;
+pub const FLUSHO: ::tcflag_t = 0x00002000;
+pub const EXTPROC: ::tcflag_t = 0o200000;
+
+pub const F_GETLK: ::c_int = 14;
+pub const F_GETOWN: ::c_int = 23;
+pub const F_SETOWN: ::c_int = 24;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+
+pub const TCGETS: ::c_ulong = 0x540d;
+pub const TCSETS: ::c_ulong = 0x540e;
+pub const TCSETSW: ::c_ulong = 0x540f;
+pub const TCSETSF: ::c_ulong = 0x5410;
+pub const TCGETA: ::c_ulong = 0x5401;
+pub const TCSETA: ::c_ulong = 0x5402;
+pub const TCSETAW: ::c_ulong = 0x5403;
+pub const TCSETAF: ::c_ulong = 0x5404;
+pub const TCSBRK: ::c_ulong = 0x5405;
+pub const TCXONC: ::c_ulong = 0x5406;
+pub const TCFLSH: ::c_ulong = 0x5407;
+pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
+pub const TIOCINQ: ::c_ulong = 0x467f;
+pub const TIOCLINUX: ::c_ulong = 0x5483;
+pub const TIOCGSERIAL: ::c_ulong = 0x5484;
+pub const TIOCEXCL: ::c_ulong = 0x740d;
+pub const TIOCNXCL: ::c_ulong = 0x740e;
+pub const TIOCSCTTY: ::c_ulong = 0x5480;
+pub const TIOCGPGRP: ::c_ulong = 0x40047477;
+pub const TIOCSPGRP: ::c_ulong = 0x80047476;
+pub const TIOCOUTQ: ::c_ulong = 0x7472;
+pub const TIOCSTI: ::c_ulong = 0x5472;
+pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
+pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
+pub const TIOCMGET: ::c_ulong = 0x741d;
+pub const TIOCMBIS: ::c_ulong = 0x741b;
+pub const TIOCMBIC: ::c_ulong = 0x741c;
+pub const TIOCMSET: ::c_ulong = 0x741a;
+pub const FIONREAD: ::c_ulong = 0x467f;
+pub const TIOCCONS: ::c_ulong = 0x80047478;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const CBAUD: ::tcflag_t = 0o0010017;
+pub const TAB1: ::tcflag_t = 0x00000800;
+pub const TAB2: ::tcflag_t = 0x00001000;
+pub const TAB3: ::tcflag_t = 0x00001800;
+pub const CR1: ::tcflag_t = 0x00000200;
+pub const CR2: ::tcflag_t = 0x00000400;
+pub const CR3: ::tcflag_t = 0x00000600;
+pub const FF1: ::tcflag_t = 0x00008000;
+pub const BS1: ::tcflag_t = 0x00002000;
+pub const VT1: ::tcflag_t = 0x00004000;
+pub const VWERASE: usize = 14;
+pub const VREPRINT: usize = 12;
+pub const VSUSP: usize = 10;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VDISCARD: usize = 13;
+pub const VTIME: usize = 5;
+pub const IXON: ::tcflag_t = 0x00000400;
+pub const IXOFF: ::tcflag_t = 0x00001000;
+pub const ONLCR: ::tcflag_t = 0x4;
+pub const CSIZE: ::tcflag_t = 0x00000030;
+pub const CS6: ::tcflag_t = 0x00000010;
+pub const CS7: ::tcflag_t = 0x00000020;
+pub const CS8: ::tcflag_t = 0x00000030;
+pub const CSTOPB: ::tcflag_t = 0x00000040;
+pub const CREAD: ::tcflag_t = 0x00000080;
+pub const PARENB: ::tcflag_t = 0x00000100;
+pub const PARODD: ::tcflag_t = 0x00000200;
+pub const HUPCL: ::tcflag_t = 0x00000400;
+pub const CLOCAL: ::tcflag_t = 0x00000800;
+pub const ECHOKE: ::tcflag_t = 0x00000800;
+pub const ECHOE: ::tcflag_t = 0x00000010;
+pub const ECHOK: ::tcflag_t = 0x00000020;
+pub const ECHONL: ::tcflag_t = 0x00000040;
+pub const ECHOPRT: ::tcflag_t = 0x00000400;
+pub const ECHOCTL: ::tcflag_t = 0x00000200;
+pub const ISIG: ::tcflag_t = 0x00000001;
+pub const ICANON: ::tcflag_t = 0x00000002;
+pub const PENDIN: ::tcflag_t = 0x00004000;
+pub const NOFLSH: ::tcflag_t = 0x00000080;
+pub const CIBAUD: ::tcflag_t = 0o02003600000;
+pub const CBAUDEX: ::tcflag_t = 0o010000;
+pub const VSWTC: usize = 7;
+pub const OLCUC: ::tcflag_t = 0o000002;
+pub const NLDLY: ::tcflag_t = 0o000400;
+pub const CRDLY: ::tcflag_t = 0o003000;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const BSDLY: ::tcflag_t = 0o020000;
+pub const FFDLY: ::tcflag_t = 0o100000;
+pub const VTDLY: ::tcflag_t = 0o040000;
+pub const XTABS: ::tcflag_t = 0o014000;
+
+pub const BOTHER: ::speed_t = 0o010000;
+pub const B57600: ::speed_t = 0o010001;
+pub const B115200: ::speed_t = 0o010002;
+pub const B230400: ::speed_t = 0o010003;
+pub const B460800: ::speed_t = 0o010004;
+pub const B500000: ::speed_t = 0o010005;
+pub const B576000: ::speed_t = 0o010006;
+pub const B921600: ::speed_t = 0o010007;
+pub const B1000000: ::speed_t = 0o010010;
+pub const B1152000: ::speed_t = 0o010011;
+pub const B1500000: ::speed_t = 0o010012;
+pub const B2000000: ::speed_t = 0o010013;
+pub const B2500000: ::speed_t = 0o010014;
+pub const B3000000: ::speed_t = 0o010015;
+pub const B3500000: ::speed_t = 0o010016;
+pub const B4000000: ::speed_t = 0o010017;
+
+pub const TIOCM_ST: ::c_int = 0x010;
+pub const TIOCM_SR: ::c_int = 0x020;
+pub const TIOCM_CTS: ::c_int = 0x040;
+pub const TIOCM_CAR: ::c_int = 0x100;
+pub const TIOCM_RNG: ::c_int = 0x200;
+pub const TIOCM_DSR: ::c_int = 0x400;
+
+pub const EHWPOISON: ::c_int = 168;
+
+extern {
+ pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
+}
diff --git a/src/unix/linux_like/linux/musl/b64/mod.rs b/src/unix/linux_like/linux/musl/b64/mod.rs
index 12d5c849f6..cb8c8c373c 100644
--- a/src/unix/linux_like/linux/musl/b64/mod.rs
+++ b/src/unix/linux_like/linux/musl/b64/mod.rs
@@ -2,21 +2,6 @@ pub type c_long = i64;
pub type c_ulong = u64;
s! {
- pub struct statfs64 {
- pub f_type: ::c_ulong,
- pub f_bsize: ::c_ulong,
- pub f_blocks: ::fsblkcnt_t,
- pub f_bfree: ::fsblkcnt_t,
- pub f_bavail: ::fsblkcnt_t,
- pub f_files: ::fsfilcnt_t,
- pub f_ffree: ::fsfilcnt_t,
- pub f_fsid: ::fsid_t,
- pub f_namelen: ::c_ulong,
- pub f_frsize: ::c_ulong,
- pub f_flags: ::c_ulong,
- pub f_spare: [::c_ulong; 4],
- }
-
pub struct statvfs64 {
pub f_bsize: ::c_ulong,
pub f_frsize: ::c_ulong,
@@ -73,21 +58,6 @@ s! {
__pad2: ::c_ulong,
}
- pub struct statfs {
- pub f_type: ::c_ulong,
- pub f_bsize: ::c_ulong,
- pub f_blocks: ::fsblkcnt_t,
- pub f_bfree: ::fsblkcnt_t,
- pub f_bavail: ::fsblkcnt_t,
- pub f_files: ::fsfilcnt_t,
- pub f_ffree: ::fsfilcnt_t,
- pub f_fsid: ::fsid_t,
- pub f_namelen: ::c_ulong,
- pub f_frsize: ::c_ulong,
- pub f_flags: ::c_ulong,
- pub f_spare: [::c_ulong; 4],
- }
-
pub struct msghdr {
pub msg_name: *mut ::c_void,
pub msg_namelen: ::socklen_t,
@@ -132,186 +102,16 @@ s! {
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
-pub const O_ASYNC: ::c_int = 0x2000;
-
pub const RLIMIT_RSS: ::c_int = 5;
pub const RLIMIT_NOFILE: ::c_int = 7;
pub const RLIMIT_AS: ::c_int = 9;
pub const RLIMIT_NPROC: ::c_int = 6;
pub const RLIMIT_MEMLOCK: ::c_int = 8;
-pub const O_APPEND: ::c_int = 1024;
-pub const O_CREAT: ::c_int = 64;
-pub const O_EXCL: ::c_int = 128;
-pub const O_NOCTTY: ::c_int = 256;
-pub const O_NONBLOCK: ::c_int = 2048;
-pub const O_SYNC: ::c_int = 1052672;
-pub const O_RSYNC: ::c_int = 1052672;
-pub const O_DSYNC: ::c_int = 4096;
-
pub const SOCK_NONBLOCK: ::c_int = 2048;
-pub const MAP_ANON: ::c_int = 0x0020;
-pub const MAP_GROWSDOWN: ::c_int = 0x0100;
-pub const MAP_DENYWRITE: ::c_int = 0x0800;
-pub const MAP_EXECUTABLE: ::c_int = 0x01000;
-pub const MAP_LOCKED: ::c_int = 0x02000;
-pub const MAP_NORESERVE: ::c_int = 0x04000;
-pub const MAP_POPULATE: ::c_int = 0x08000;
-pub const MAP_NONBLOCK: ::c_int = 0x010000;
-pub const MAP_STACK: ::c_int = 0x020000;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
pub const SOCK_SEQPACKET: ::c_int = 5;
-pub const SOL_SOCKET: ::c_int = 1;
-
-pub const ENAMETOOLONG: ::c_int = 36;
-pub const ENOLCK: ::c_int = 37;
-pub const ENOSYS: ::c_int = 38;
-pub const ENOTEMPTY: ::c_int = 39;
-pub const ELOOP: ::c_int = 40;
-pub const ENOMSG: ::c_int = 42;
-pub const EIDRM: ::c_int = 43;
-pub const ECHRNG: ::c_int = 44;
-pub const EL2NSYNC: ::c_int = 45;
-pub const EL3HLT: ::c_int = 46;
-pub const EL3RST: ::c_int = 47;
-pub const ELNRNG: ::c_int = 48;
-pub const EUNATCH: ::c_int = 49;
-pub const ENOCSI: ::c_int = 50;
-pub const EL2HLT: ::c_int = 51;
-pub const EBADE: ::c_int = 52;
-pub const EBADR: ::c_int = 53;
-pub const EXFULL: ::c_int = 54;
-pub const ENOANO: ::c_int = 55;
-pub const EBADRQC: ::c_int = 56;
-pub const EBADSLT: ::c_int = 57;
-pub const EMULTIHOP: ::c_int = 72;
-pub const EBADMSG: ::c_int = 74;
-pub const EOVERFLOW: ::c_int = 75;
-pub const ENOTUNIQ: ::c_int = 76;
-pub const EBADFD: ::c_int = 77;
-pub const EREMCHG: ::c_int = 78;
-pub const ELIBACC: ::c_int = 79;
-pub const ELIBBAD: ::c_int = 80;
-pub const ELIBSCN: ::c_int = 81;
-pub const ELIBMAX: ::c_int = 82;
-pub const ELIBEXEC: ::c_int = 83;
-pub const EILSEQ: ::c_int = 84;
-pub const ERESTART: ::c_int = 85;
-pub const ESTRPIPE: ::c_int = 86;
-pub const EUSERS: ::c_int = 87;
-pub const ENOTSOCK: ::c_int = 88;
-pub const EDESTADDRREQ: ::c_int = 89;
-pub const EMSGSIZE: ::c_int = 90;
-pub const EPROTOTYPE: ::c_int = 91;
-pub const ENOPROTOOPT: ::c_int = 92;
-pub const EPROTONOSUPPORT: ::c_int = 93;
-pub const ESOCKTNOSUPPORT: ::c_int = 94;
-pub const EOPNOTSUPP: ::c_int = 95;
-pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-pub const EPFNOSUPPORT: ::c_int = 96;
-pub const EAFNOSUPPORT: ::c_int = 97;
-pub const EADDRINUSE: ::c_int = 98;
-pub const EADDRNOTAVAIL: ::c_int = 99;
-pub const ENETDOWN: ::c_int = 100;
-pub const ENETUNREACH: ::c_int = 101;
-pub const ENETRESET: ::c_int = 102;
-pub const ECONNABORTED: ::c_int = 103;
-pub const ECONNRESET: ::c_int = 104;
-pub const ENOBUFS: ::c_int = 105;
-pub const EISCONN: ::c_int = 106;
-pub const ENOTCONN: ::c_int = 107;
-pub const ESHUTDOWN: ::c_int = 108;
-pub const ETOOMANYREFS: ::c_int = 109;
-pub const ETIMEDOUT: ::c_int = 110;
-pub const ECONNREFUSED: ::c_int = 111;
-pub const EHOSTDOWN: ::c_int = 112;
-pub const EHOSTUNREACH: ::c_int = 113;
-pub const EALREADY: ::c_int = 114;
-pub const EINPROGRESS: ::c_int = 115;
-pub const ESTALE: ::c_int = 116;
-pub const EUCLEAN: ::c_int = 117;
-pub const ENOTNAM: ::c_int = 118;
-pub const ENAVAIL: ::c_int = 119;
-pub const EISNAM: ::c_int = 120;
-pub const EREMOTEIO: ::c_int = 121;
-pub const EDQUOT: ::c_int = 122;
-pub const ENOMEDIUM: ::c_int = 123;
-pub const EMEDIUMTYPE: ::c_int = 124;
-pub const ECANCELED: ::c_int = 125;
-pub const ENOKEY: ::c_int = 126;
-pub const EKEYEXPIRED: ::c_int = 127;
-pub const EKEYREVOKED: ::c_int = 128;
-pub const EKEYREJECTED: ::c_int = 129;
-pub const EOWNERDEAD: ::c_int = 130;
-pub const ENOTRECOVERABLE: ::c_int = 131;
-pub const ERFKILL: ::c_int = 132;
-pub const EHWPOISON: ::c_int = 133;
-
-pub const SO_REUSEADDR: ::c_int = 2;
-pub const SO_TYPE: ::c_int = 3;
-pub const SO_ERROR: ::c_int = 4;
-pub const SO_DONTROUTE: ::c_int = 5;
-pub const SO_BROADCAST: ::c_int = 6;
-pub const SO_SNDBUF: ::c_int = 7;
-pub const SO_RCVBUF: ::c_int = 8;
-pub const SO_KEEPALIVE: ::c_int = 9;
-pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_NO_CHECK: ::c_int = 11;
-pub const SO_PRIORITY: ::c_int = 12;
-pub const SO_LINGER: ::c_int = 13;
-pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_ACCEPTCONN: ::c_int = 30;
-pub const SO_SNDBUFFORCE: ::c_int = 32;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-pub const SO_PROTOCOL: ::c_int = 38;
-pub const SO_DOMAIN: ::c_int = 39;
-
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 0x00000004;
-pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
-
-pub const SIGCHLD: ::c_int = 17;
-pub const SIGBUS: ::c_int = 7;
-pub const SIGTTIN: ::c_int = 21;
-pub const SIGTTOU: ::c_int = 22;
-pub const SIGXCPU: ::c_int = 24;
-pub const SIGXFSZ: ::c_int = 25;
-pub const SIGVTALRM: ::c_int = 26;
-pub const SIGPROF: ::c_int = 27;
-pub const SIGWINCH: ::c_int = 28;
-pub const SIGUSR1: ::c_int = 10;
-pub const SIGUSR2: ::c_int = 12;
-pub const SIGCONT: ::c_int = 18;
-pub const SIGSTOP: ::c_int = 19;
-pub const SIGTSTP: ::c_int = 20;
-pub const SIGURG: ::c_int = 23;
-pub const SIGIO: ::c_int = 29;
-pub const SIGSYS: ::c_int = 31;
-pub const SIGSTKFLT: ::c_int = 16;
-pub const SIGPOLL: ::c_int = 29;
-pub const SIGPWR: ::c_int = 30;
-pub const SIG_SETMASK: ::c_int = 2;
-pub const SIG_BLOCK: ::c_int = 0x000000;
-pub const SIG_UNBLOCK: ::c_int = 0x01;
-
-pub const MAP_HUGETLB: ::c_int = 0x040000;
-
-pub const F_GETLK: ::c_int = 5;
-pub const F_GETOWN: ::c_int = 9;
-pub const F_SETLK: ::c_int = 6;
-pub const F_SETLKW: ::c_int = 7;
-pub const F_SETOWN: ::c_int = 8;
-
-pub const VEOF: usize = 4;
-
-pub const POLLWRNORM: ::c_short = 0x100;
-pub const POLLWRBAND: ::c_short = 0x200;
-
extern {
pub fn getrandom(
buf: *mut ::c_void,
@@ -324,6 +124,9 @@ cfg_if! {
if #[cfg(target_arch = "aarch64")] {
mod aarch64;
pub use self::aarch64::*;
+ } else if #[cfg(target_arch = "mips64")] {
+ mod mips64;
+ pub use self::mips64::*;
} else if #[cfg(any(target_arch = "powerpc64"))] {
mod powerpc64;
pub use self::powerpc64::*;
diff --git a/src/unix/linux_like/linux/musl/b64/powerpc64.rs b/src/unix/linux_like/linux/musl/b64/powerpc64.rs
index 04ceb79a45..41c88c5b00 100644
--- a/src/unix/linux_like/linux/musl/b64/powerpc64.rs
+++ b/src/unix/linux_like/linux/musl/b64/powerpc64.rs
@@ -47,6 +47,36 @@ s! {
__reserved: [::c_long; 3],
}
+ pub struct statfs {
+ pub f_type: ::c_ulong,
+ pub f_bsize: ::c_ulong,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+ pub f_namelen: ::c_ulong,
+ pub f_frsize: ::c_ulong,
+ pub f_flags: ::c_ulong,
+ pub f_spare: [::c_ulong; 4],
+ }
+
+ pub struct statfs64 {
+ pub f_type: ::c_ulong,
+ pub f_bsize: ::c_ulong,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+ pub f_namelen: ::c_ulong,
+ pub f_frsize: ::c_ulong,
+ pub f_flags: ::c_ulong,
+ pub f_spare: [::c_ulong; 4],
+ }
+
pub struct ipc_perm {
pub __ipc_perm_key: ::key_t,
pub uid: ::uid_t,
@@ -62,10 +92,31 @@ s! {
pub const MADV_SOFT_OFFLINE: ::c_int = 101;
pub const MAP_32BIT: ::c_int = 0x0040;
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+pub const MAP_DENYWRITE: ::c_int = 0x0800;
+pub const MAP_EXECUTABLE: ::c_int = 0x01000;
+pub const MAP_LOCKED: ::c_int = 0x02000;
+pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_POPULATE: ::c_int = 0x08000;
+pub const MAP_NONBLOCK: ::c_int = 0x010000;
+pub const MAP_STACK: ::c_int = 0x020000;
+pub const MAP_HUGETLB: ::c_int = 0x040000;
+pub const O_ASYNC: ::c_int = 0x2000;
+pub const O_APPEND: ::c_int = 1024;
+pub const O_CREAT: ::c_int = 64;
+pub const O_EXCL: ::c_int = 128;
+pub const O_NOCTTY: ::c_int = 256;
+pub const O_NONBLOCK: ::c_int = 2048;
+pub const O_SYNC: ::c_int = 1052672;
+pub const O_RSYNC: ::c_int = 1052672;
+pub const O_DSYNC: ::c_int = 4096;
pub const O_DIRECT: ::c_int = 0x20000;
pub const O_DIRECTORY: ::c_int = 0x4000;
pub const O_LARGEFILE: ::c_int = 0x10000;
pub const O_NOFOLLOW: ::c_int = 0x8000;
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
pub const SIGSTKSZ: ::size_t = 10240;
pub const MINSIGSTKSZ: ::size_t = 4096;
@@ -431,11 +482,117 @@ pub const SYS_preadv2: ::c_long = 380;
pub const SYS_pwritev2: ::c_long = 381;
pub const SYS_kexec_file_load: ::c_long = 382;
+pub const ENAMETOOLONG: ::c_int = 36;
+pub const ENOLCK: ::c_int = 37;
+pub const ENOSYS: ::c_int = 38;
+pub const ENOTEMPTY: ::c_int = 39;
+pub const ELOOP: ::c_int = 40;
+pub const ENOMSG: ::c_int = 42;
+pub const EIDRM: ::c_int = 43;
+pub const ECHRNG: ::c_int = 44;
+pub const EL2NSYNC: ::c_int = 45;
+pub const EL3HLT: ::c_int = 46;
+pub const EL3RST: ::c_int = 47;
+pub const ELNRNG: ::c_int = 48;
+pub const EUNATCH: ::c_int = 49;
+pub const ENOCSI: ::c_int = 50;
+pub const EL2HLT: ::c_int = 51;
+pub const EBADE: ::c_int = 52;
+pub const EBADR: ::c_int = 53;
+pub const EXFULL: ::c_int = 54;
+pub const ENOANO: ::c_int = 55;
+pub const EBADRQC: ::c_int = 56;
+pub const EBADSLT: ::c_int = 57;
+pub const EMULTIHOP: ::c_int = 72;
+pub const EBADMSG: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 75;
+pub const ENOTUNIQ: ::c_int = 76;
+pub const EBADFD: ::c_int = 77;
+pub const EREMCHG: ::c_int = 78;
+pub const ELIBACC: ::c_int = 79;
+pub const ELIBBAD: ::c_int = 80;
+pub const ELIBSCN: ::c_int = 81;
+pub const ELIBMAX: ::c_int = 82;
+pub const ELIBEXEC: ::c_int = 83;
+pub const EILSEQ: ::c_int = 84;
+pub const ERESTART: ::c_int = 85;
+pub const ESTRPIPE: ::c_int = 86;
+pub const EUSERS: ::c_int = 87;
+pub const ENOTSOCK: ::c_int = 88;
+pub const EDESTADDRREQ: ::c_int = 89;
+pub const EMSGSIZE: ::c_int = 90;
+pub const EPROTOTYPE: ::c_int = 91;
+pub const ENOPROTOOPT: ::c_int = 92;
+pub const EPROTONOSUPPORT: ::c_int = 93;
+pub const ESOCKTNOSUPPORT: ::c_int = 94;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const EAFNOSUPPORT: ::c_int = 97;
+pub const EADDRINUSE: ::c_int = 98;
+pub const EADDRNOTAVAIL: ::c_int = 99;
+pub const ENETDOWN: ::c_int = 100;
+
+pub const F_GETLK: ::c_int = 5;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+pub const F_SETOWN: ::c_int = 8;
+
+pub const SIGCHLD: ::c_int = 17;
+pub const SIGBUS: ::c_int = 7;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
+pub const SIGUSR1: ::c_int = 10;
+pub const SIGUSR2: ::c_int = 12;
+pub const SIGCONT: ::c_int = 18;
+pub const SIGSTOP: ::c_int = 19;
+pub const SIGTSTP: ::c_int = 20;
+pub const SIGURG: ::c_int = 23;
+pub const SIGIO: ::c_int = 29;
+pub const SIGSYS: ::c_int = 31;
+pub const SIGSTKFLT: ::c_int = 16;
+pub const SIGPOLL: ::c_int = 29;
+pub const SIGPWR: ::c_int = 30;
+pub const SIG_SETMASK: ::c_int = 2;
+pub const SIG_BLOCK: ::c_int = 0x000000;
+pub const SIG_UNBLOCK: ::c_int = 0x01;
+
pub const FIOCLEX: ::c_int = 0x20006601;
pub const FIONCLEX: ::c_int = 0x20006602;
pub const FIONBIO: ::c_int = 0x8004667e;
pub const EDEADLK: ::c_int = 58;
pub const EDEADLOCK: ::c_int = EDEADLK;
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+pub const SOL_SOCKET: ::c_int = 1;
+pub const SO_REUSEADDR: ::c_int = 2;
+pub const SO_TYPE: ::c_int = 3;
+pub const SO_ERROR: ::c_int = 4;
+pub const SO_DONTROUTE: ::c_int = 5;
+pub const SO_BROADCAST: ::c_int = 6;
+pub const SO_SNDBUF: ::c_int = 7;
+pub const SO_RCVBUF: ::c_int = 8;
+pub const SO_KEEPALIVE: ::c_int = 9;
+pub const SO_OOBINLINE: ::c_int = 10;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_LINGER: ::c_int = 13;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_REUSEPORT: ::c_int = 15;
+pub const SO_ACCEPTCONN: ::c_int = 30;
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
pub const SO_PASSCRED: ::c_int = 20;
pub const SO_PEERCRED: ::c_int = 21;
pub const SO_RCVLOWAT: ::c_int = 16;
@@ -443,6 +600,7 @@ pub const SO_SNDLOWAT: ::c_int = 17;
pub const SO_RCVTIMEO: ::c_int = 18;
pub const SO_SNDTIMEO: ::c_int = 19;
pub const EXTPROC: ::tcflag_t = 0x10000000;
+pub const VEOF: usize = 4;
pub const VEOL: usize = 6;
pub const VEOL2: usize = 8;
pub const VMIN: usize = 5;
@@ -567,6 +725,8 @@ pub const B3000000: ::speed_t = 0o00034;
pub const B3500000: ::speed_t = 0o00035;
pub const B4000000: ::speed_t = 0o00036;
+pub const EHWPOISON: ::c_int = 133;
+
extern {
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
}
diff --git a/src/unix/linux_like/linux/musl/b64/x86_64.rs b/src/unix/linux_like/linux/musl/b64/x86_64.rs
index b4023f726c..0c17cdb8e8 100644
--- a/src/unix/linux_like/linux/musl/b64/x86_64.rs
+++ b/src/unix/linux_like/linux/musl/b64/x86_64.rs
@@ -47,6 +47,36 @@ s! {
__reserved: [::c_long; 3],
}
+ pub struct statfs {
+ pub f_type: ::c_ulong,
+ pub f_bsize: ::c_ulong,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+ pub f_namelen: ::c_ulong,
+ pub f_frsize: ::c_ulong,
+ pub f_flags: ::c_ulong,
+ pub f_spare: [::c_ulong; 4],
+ }
+
+ pub struct statfs64 {
+ pub f_type: ::c_ulong,
+ pub f_bsize: ::c_ulong,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+ pub f_namelen: ::c_ulong,
+ pub f_frsize: ::c_ulong,
+ pub f_flags: ::c_ulong,
+ pub f_spare: [::c_ulong; 4],
+ }
+
pub struct mcontext_t {
__private: [u64; 32],
}
@@ -454,6 +484,57 @@ pub const SYS_pwritev2: ::c_long = 328;
// FIXME syscalls 329-331 have been added in musl 1.16
// See discussion https://github.com/rust-lang/libc/pull/699
+pub const ENAMETOOLONG: ::c_int = 36;
+pub const ENOLCK: ::c_int = 37;
+pub const ENOSYS: ::c_int = 38;
+pub const ENOTEMPTY: ::c_int = 39;
+pub const ELOOP: ::c_int = 40;
+pub const ENOMSG: ::c_int = 42;
+pub const EIDRM: ::c_int = 43;
+pub const ECHRNG: ::c_int = 44;
+pub const EL2NSYNC: ::c_int = 45;
+pub const EL3HLT: ::c_int = 46;
+pub const EL3RST: ::c_int = 47;
+pub const ELNRNG: ::c_int = 48;
+pub const EUNATCH: ::c_int = 49;
+pub const ENOCSI: ::c_int = 50;
+pub const EL2HLT: ::c_int = 51;
+pub const EBADE: ::c_int = 52;
+pub const EBADR: ::c_int = 53;
+pub const EXFULL: ::c_int = 54;
+pub const ENOANO: ::c_int = 55;
+pub const EBADRQC: ::c_int = 56;
+pub const EBADSLT: ::c_int = 57;
+pub const EMULTIHOP: ::c_int = 72;
+pub const EBADMSG: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 75;
+pub const ENOTUNIQ: ::c_int = 76;
+pub const EBADFD: ::c_int = 77;
+pub const EREMCHG: ::c_int = 78;
+pub const ELIBACC: ::c_int = 79;
+pub const ELIBBAD: ::c_int = 80;
+pub const ELIBSCN: ::c_int = 81;
+pub const ELIBMAX: ::c_int = 82;
+pub const ELIBEXEC: ::c_int = 83;
+pub const EILSEQ: ::c_int = 84;
+pub const ERESTART: ::c_int = 85;
+pub const ESTRPIPE: ::c_int = 86;
+pub const EUSERS: ::c_int = 87;
+pub const ENOTSOCK: ::c_int = 88;
+pub const EDESTADDRREQ: ::c_int = 89;
+pub const EMSGSIZE: ::c_int = 90;
+pub const EPROTOTYPE: ::c_int = 91;
+pub const ENOPROTOOPT: ::c_int = 92;
+pub const EPROTONOSUPPORT: ::c_int = 93;
+pub const ESOCKTNOSUPPORT: ::c_int = 94;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const EAFNOSUPPORT: ::c_int = 97;
+pub const EADDRINUSE: ::c_int = 98;
+pub const EADDRNOTAVAIL: ::c_int = 99;
+pub const ENETDOWN: ::c_int = 100;
+
// offsets in user_regs_structs, from sys/reg.h
pub const R15: ::c_int = 0;
pub const R14: ::c_int = 1;
@@ -483,12 +564,63 @@ pub const ES: ::c_int = 24;
pub const FS: ::c_int = 25;
pub const GS: ::c_int = 26;
+pub const F_GETLK: ::c_int = 5;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+pub const F_SETOWN: ::c_int = 8;
+
pub const MADV_SOFT_OFFLINE: ::c_int = 101;
pub const MAP_32BIT: ::c_int = 0x0040;
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+pub const MAP_DENYWRITE: ::c_int = 0x0800;
+pub const MAP_EXECUTABLE: ::c_int = 0x01000;
+pub const MAP_LOCKED: ::c_int = 0x02000;
+pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_POPULATE: ::c_int = 0x08000;
+pub const MAP_NONBLOCK: ::c_int = 0x010000;
+pub const MAP_STACK: ::c_int = 0x020000;
+pub const MAP_HUGETLB: ::c_int = 0x040000;
+pub const O_ASYNC: ::c_int = 0x2000;
+pub const O_APPEND: ::c_int = 1024;
+pub const O_CREAT: ::c_int = 64;
+pub const O_EXCL: ::c_int = 128;
+pub const O_NOCTTY: ::c_int = 256;
+pub const O_NONBLOCK: ::c_int = 2048;
+pub const O_SYNC: ::c_int = 1052672;
+pub const O_RSYNC: ::c_int = 1052672;
+pub const O_DSYNC: ::c_int = 4096;
pub const O_DIRECT: ::c_int = 0x4000;
pub const O_DIRECTORY: ::c_int = 0x10000;
pub const O_LARGEFILE: ::c_int = 0;
pub const O_NOFOLLOW: ::c_int = 0x20000;
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
+
+pub const SIGCHLD: ::c_int = 17;
+pub const SIGBUS: ::c_int = 7;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
+pub const SIGUSR1: ::c_int = 10;
+pub const SIGUSR2: ::c_int = 12;
+pub const SIGCONT: ::c_int = 18;
+pub const SIGSTOP: ::c_int = 19;
+pub const SIGTSTP: ::c_int = 20;
+pub const SIGURG: ::c_int = 23;
+pub const SIGIO: ::c_int = 29;
+pub const SIGSYS: ::c_int = 31;
+pub const SIGSTKFLT: ::c_int = 16;
+pub const SIGPOLL: ::c_int = 29;
+pub const SIGPWR: ::c_int = 30;
+pub const SIG_SETMASK: ::c_int = 2;
+pub const SIG_BLOCK: ::c_int = 0x000000;
+pub const SIG_UNBLOCK: ::c_int = 0x01;
pub const TIOCGRS485: ::c_int = 0x542E;
pub const TIOCSRS485: ::c_int = 0x542F;
@@ -572,6 +704,31 @@ pub const FIONCLEX: ::c_int = 0x5450;
pub const FIONBIO: ::c_int = 0x5421;
pub const EDEADLK: ::c_int = 35;
pub const EDEADLOCK: ::c_int = EDEADLK;
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+pub const SOL_SOCKET: ::c_int = 1;
+pub const SO_REUSEADDR: ::c_int = 2;
+pub const SO_TYPE: ::c_int = 3;
+pub const SO_ERROR: ::c_int = 4;
+pub const SO_DONTROUTE: ::c_int = 5;
+pub const SO_BROADCAST: ::c_int = 6;
+pub const SO_SNDBUF: ::c_int = 7;
+pub const SO_RCVBUF: ::c_int = 8;
+pub const SO_KEEPALIVE: ::c_int = 9;
+pub const SO_OOBINLINE: ::c_int = 10;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_LINGER: ::c_int = 13;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_REUSEPORT: ::c_int = 15;
+pub const SO_ACCEPTCONN: ::c_int = 30;
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
pub const SO_PASSCRED: ::c_int = 16;
pub const SO_PEERCRED: ::c_int = 17;
pub const SO_RCVLOWAT: ::c_int = 18;
@@ -579,6 +736,7 @@ pub const SO_SNDLOWAT: ::c_int = 19;
pub const SO_RCVTIMEO: ::c_int = 20;
pub const SO_SNDTIMEO: ::c_int = 21;
pub const EXTPROC: ::tcflag_t = 0x00010000;
+pub const VEOF: usize = 4;
pub const VEOL: usize = 11;
pub const VEOL2: usize = 16;
pub const VMIN: usize = 6;
@@ -628,6 +786,8 @@ pub const TIOCM_DSR: ::c_int = 0x100;
pub const TIOCM_CD: ::c_int = TIOCM_CAR;
pub const TIOCM_RI: ::c_int = TIOCM_RNG;
+pub const EHWPOISON: ::c_int = 133;
+
extern {
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
}
diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs
index e47af4f280..9c26c7973b 100644
--- a/src/unix/linux_like/linux/musl/mod.rs
+++ b/src/unix/linux_like/linux/musl/mod.rs
@@ -409,6 +409,7 @@ extern {
cfg_if! {
if #[cfg(any(target_arch = "x86_64",
target_arch = "aarch64",
+ target_arch = "mips64",
target_arch = "powerpc64"))] {
mod b64;
pub use self::b64::*;
diff --git a/src/unix/newlib/aarch64/mod.rs b/src/unix/newlib/aarch64/mod.rs
index 96f381a391..7e1b2bb70e 100644
--- a/src/unix/newlib/aarch64/mod.rs
+++ b/src/unix/newlib/aarch64/mod.rs
@@ -3,3 +3,31 @@ pub type wchar_t = u32;
pub type c_long = i64;
pub type c_ulong = u64;
+
+s! {
+ pub struct sockaddr {
+ pub sa_len: u8,
+ pub sa_family: ::sa_family_t,
+ pub sa_data: [::c_char; 14],
+ }
+
+ pub struct sockaddr_in6 {
+ pub sin6_len: u8,
+ pub sin6_family: ::sa_family_t,
+ pub sin6_port: ::in_port_t,
+ pub sin6_flowinfo: u32,
+ pub sin6_addr: ::in6_addr,
+ pub sin6_scope_id: u32,
+ }
+
+ pub struct sockaddr_in {
+ pub sin_len: u8,
+ pub sin_family: ::sa_family_t,
+ pub sin_port: ::in_port_t,
+ pub sin_addr: ::in_addr,
+ pub sin_zero: [::c_char; 8],
+ }
+}
+
+pub const POLLOUT: ::c_short = 0x4;
+pub const POLLHUP: ::c_short = 0x10;
diff --git a/src/unix/newlib/arm/mod.rs b/src/unix/newlib/arm/mod.rs
index 372a48c4b4..39cb425fe7 100644
--- a/src/unix/newlib/arm/mod.rs
+++ b/src/unix/newlib/arm/mod.rs
@@ -3,3 +3,33 @@ pub type wchar_t = u32;
pub type c_long = i32;
pub type c_ulong = u32;
+
+s! {
+ pub struct sockaddr {
+ pub sa_family: ::sa_family_t,
+ pub sa_data: [::c_char; 14],
+ }
+
+ pub struct sockaddr_in6 {
+ pub sin6_family: ::sa_family_t,
+ pub sin6_port: ::in_port_t,
+ pub sin6_flowinfo: u32,
+ pub sin6_addr: ::in6_addr,
+ pub sin6_scope_id: u32,
+ }
+
+ pub struct sockaddr_in {
+ pub sin_family: ::sa_family_t,
+ pub sin_port: ::in_port_t,
+ pub sin_addr: ::in_addr,
+ pub sin_zero: [u8; 8],
+ }
+
+ pub struct sockaddr_storage {
+ pub ss_family: ::sa_family_t,
+ pub __ss_padding: [u8; 26],
+ }
+}
+
+pub const POLLOUT: ::c_short = 0x10;
+pub const POLLHUP: ::c_short = 0x4;
diff --git a/src/unix/newlib/mod.rs b/src/unix/newlib/mod.rs
index 7e7310965d..9e9fce746d 100644
--- a/src/unix/newlib/mod.rs
+++ b/src/unix/newlib/mod.rs
@@ -25,31 +25,6 @@ pub type time_t = i32;
pub type useconds_t = u32;
s! {
- pub struct sockaddr {
- pub sa_family: sa_family_t,
- pub sa_data: [::c_char; 14],
- }
-
- pub struct sockaddr_in {
- pub sin_family: sa_family_t,
- pub sin_port: ::in_port_t,
- pub sin_addr: ::in_addr,
- pub sin_zero: [u8; 8],
- }
-
- pub struct sockaddr_in6 { // Unverified
- pub sin6_family: sa_family_t,
- pub sin6_port: ::in_port_t,
- pub sin6_flowinfo: u32,
- pub sin6_addr: ::in6_addr,
- pub sin6_scope_id: u32,
- }
-
- pub struct sockaddr_storage {
- pub ss_family: sa_family_t,
- pub __ss_padding: [u8; 26],
- }
-
pub struct addrinfo {
pub ai_flags: ::c_int,
pub ai_family: ::c_int,
@@ -391,9 +366,7 @@ pub const O_CLOEXEC: ::c_int = 0x80000;
pub const POLLIN: ::c_short = 0x1;
pub const POLLPRI: ::c_short = 0x2;
-pub const POLLOUT: ::c_short = 0x4;
pub const POLLERR: ::c_short = 0x8;
-pub const POLLHUP: ::c_short = 0x10;
pub const POLLNVAL: ::c_short = 0x20;
pub const RTLD_LAZY: ::c_int = 0x1;
diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs
index 2591a7938a..02f5435d66 100644
--- a/src/unix/redox/mod.rs
+++ b/src/unix/redox/mod.rs
@@ -610,6 +610,124 @@ pub const SOCK_STREAM: ::c_int = 1;
pub const SOCK_DGRAM: ::c_int = 2;
pub const SOL_SOCKET: ::c_int = 1;
+// sys/termios.h
+pub const NCCS: usize = 32;
+
+pub const VINTR: usize = 0;
+pub const VQUIT: usize = 1;
+pub const VERASE: usize = 2;
+pub const VKILL: usize = 3;
+pub const VEOF: usize = 4;
+pub const VTIME: usize = 5;
+pub const VMIN: usize = 6;
+pub const VSWTC: usize = 7;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VSUSP: usize = 10;
+pub const VEOL: usize = 11;
+pub const VREPRINT: usize = 12;
+pub const VDISCARD: usize = 13;
+pub const VWERASE: usize = 14;
+pub const VLNEXT: usize = 15;
+pub const VEOL2: usize = 16;
+
+pub const IGNBRK: ::tcflag_t = 0o000_001;
+pub const BRKINT: ::tcflag_t = 0o000_002;
+pub const IGNPAR: ::tcflag_t = 0o000_004;
+pub const PARMRK: ::tcflag_t = 0o000_010;
+pub const INPCK: ::tcflag_t = 0o000_020;
+pub const ISTRIP: ::tcflag_t = 0o000_040;
+pub const INLCR: ::tcflag_t = 0o000_100;
+pub const IGNCR: ::tcflag_t = 0o000_200;
+pub const ICRNL: ::tcflag_t = 0o000_400;
+pub const IUCLC: ::tcflag_t = 0o001_000;
+pub const IXON: ::tcflag_t = 0o002_000;
+pub const IXANY: ::tcflag_t = 0o004_000;
+pub const IXOFF: ::tcflag_t = 0o010_000;
+pub const IMAXBEL: ::tcflag_t = 0o020_000;
+pub const IUTF8: ::tcflag_t = 0o040_000;
+
+pub const OPOST: ::tcflag_t = 0o000_001;
+pub const OLCUC: ::tcflag_t = 0o000_002;
+pub const ONLCR: ::tcflag_t = 0o000_004;
+pub const OCRNL: ::tcflag_t = 0o000_010;
+pub const ONOCR: ::tcflag_t = 0o000_020;
+pub const ONLRET: ::tcflag_t = 0o00_0040;
+pub const OFILL: ::tcflag_t = 0o000_100;
+pub const OFDEL: ::tcflag_t = 0o000_200;
+
+pub const VTDLY: usize = 0o040_000;
+pub const VT0: usize = 0o000_000;
+pub const VT1: usize = 0o040_000;
+
+pub const B0: speed_t = 0o000_000;
+pub const B50: speed_t = 0o000_001;
+pub const B75: speed_t = 0o000_002;
+pub const B110: speed_t = 0o000_003;
+pub const B134: speed_t = 0o000_004;
+pub const B150: speed_t = 0o000_005;
+pub const B200: speed_t = 0o000_006;
+pub const B300: speed_t = 0o000_007;
+pub const B600: speed_t = 0o000_010;
+pub const B1200: speed_t = 0o000_011;
+pub const B1800: speed_t = 0o000_012;
+pub const B2400: speed_t = 0o000_013;
+pub const B4800: speed_t = 0o000_014;
+pub const B9600: speed_t = 0o000_015;
+pub const B19200: speed_t = 0o000_016;
+pub const B38400: speed_t = 0o000_017;
+
+pub const B57600: speed_t = 0o010_001;
+pub const B115200: speed_t = 0o010_002;
+pub const B230400: speed_t = 0o010_003;
+pub const B460800: speed_t = 0o010_004;
+pub const B500000: speed_t = 0o010_005;
+pub const B576000: speed_t = 0o010_006;
+pub const B921600: speed_t = 0o010_007;
+pub const B1000000: speed_t = 0o010_010;
+pub const B1152000: speed_t = 0o010_011;
+pub const B1500000: speed_t = 0o010_012;
+pub const B2000000: speed_t = 0o010_013;
+pub const B2500000: speed_t = 0o010_014;
+pub const B3000000: speed_t = 0o010_015;
+pub const B3500000: speed_t = 0o010_016;
+pub const B4000000: speed_t = 0o010_017;
+
+pub const CSIZE: ::tcflag_t = 0o000_060;
+pub const CS5: ::tcflag_t = 0o000_000;
+pub const CS6: ::tcflag_t = 0o000_020;
+pub const CS7: ::tcflag_t = 0o000_040;
+pub const CS8: ::tcflag_t = 0o000_060;
+pub const CSTOPB: ::tcflag_t = 0o000_100;
+pub const CREAD: ::tcflag_t = 0o000_200;
+pub const PARENB: ::tcflag_t = 0o000_400;
+pub const PARODD: ::tcflag_t = 0o001_000;
+pub const HUPCL: ::tcflag_t = 0o002_000;
+pub const CLOCAL: ::tcflag_t = 0o004_000;
+
+pub const ISIG: ::tcflag_t = 0o000_001;
+pub const ICANON: ::tcflag_t = 0o000_002;
+pub const ECHO: ::tcflag_t = 0o000_010;
+pub const ECHOE: ::tcflag_t = 0o000_020;
+pub const ECHOK: ::tcflag_t = 0o000_040;
+pub const ECHONL: ::tcflag_t = 0o000_100;
+pub const NOFLSH: ::tcflag_t = 0o000_200;
+pub const TOSTOP: ::tcflag_t = 0o000_400;
+pub const IEXTEN: ::tcflag_t = 0o100_000;
+
+pub const TCOOFF: ::c_int = 0;
+pub const TCOON: ::c_int = 1;
+pub const TCIOFF: ::c_int = 2;
+pub const TCION: ::c_int = 3;
+
+pub const TCIFLUSH: ::c_int = 0;
+pub const TCOFLUSH: ::c_int = 1;
+pub const TCIOFLUSH: ::c_int = 2;
+
+pub const TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 1;
+pub const TCSAFLUSH: ::c_int = 2;
+
// sys/wait.h
pub const WNOHANG: ::c_int = 1;
pub const WUNTRACED: ::c_int = 2;
@@ -624,9 +742,6 @@ pub const __WALL: ::c_int = 0x4000_0000;
#[allow(overflowing_literals)]
pub const __WCLONE: ::c_int = 0x8000_0000;
-// termios.h
-pub const NCCS: usize = 32;
-
// time.h
pub const CLOCK_REALTIME: ::c_int = 1;
pub const CLOCK_MONOTONIC: ::c_int = 4;
diff --git a/src/vxworks/mod.rs b/src/vxworks/mod.rs
index 19aa2b69d0..dd6e6f1cb5 100755
--- a/src/vxworks/mod.rs
+++ b/src/vxworks/mod.rs
@@ -1,4 +1,5 @@
-//! Hacking together the definitions for VxWorks Bindings
+//! Interface to VxWorks C library
+
use core::mem::size_of;
use core::ptr::null_mut;
@@ -188,7 +189,7 @@ s! {
pub __ss_pad2 : [::c_char; 32],
pub __ss_pad3 : [::c_char; 32],
pub __ss_pad4 : [::c_char; 32],
- pub __ss_pad5 : [::c_char; 32],
+ pub __ss_pad5 : [::c_char; _SS_PAD2SIZE - 96],
}
pub struct iovec {
pub iov_base: *mut ::c_void,
@@ -963,15 +964,7 @@ extern {
pub fn isxdigit(c: c_int) -> c_int;
pub fn tolower(c: c_int) -> c_int;
pub fn toupper(c: c_int) -> c_int;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "fopen$UNIX2003"
- )]
pub fn fopen(filename: *const c_char, mode: *const c_char) -> *mut FILE;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "freopen$UNIX2003"
- )]
pub fn freopen(
filename: *const c_char,
mode: *const c_char,
@@ -995,10 +988,6 @@ extern {
pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE)
-> *mut c_char;
pub fn fputc(c: c_int, stream: *mut FILE) -> c_int;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "fputs$UNIX2003"
- )]
pub fn fputs(s: *const c_char, stream: *mut FILE) -> c_int;
pub fn puts(s: *const c_char) -> c_int;
pub fn ungetc(c: c_int, stream: *mut FILE) -> c_int;
@@ -1008,10 +997,6 @@ extern {
nobj: size_t,
stream: *mut FILE,
) -> size_t;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "fwrite$UNIX2003"
- )]
pub fn fwrite(
ptr: *const c_void,
size: size_t,
@@ -1021,18 +1006,12 @@ extern {
pub fn fseek(stream: *mut FILE, offset: c_long, whence: c_int) -> c_int;
pub fn ftell(stream: *mut FILE) -> c_long;
pub fn rewind(stream: *mut FILE);
- #[cfg_attr(target_os = "netbsd", link_name = "__fgetpos50")]
pub fn fgetpos(stream: *mut FILE, ptr: *mut fpos_t) -> c_int;
- #[cfg_attr(target_os = "netbsd", link_name = "__fsetpos50")]
pub fn fsetpos(stream: *mut FILE, ptr: *const fpos_t) -> c_int;
pub fn feof(stream: *mut FILE) -> c_int;
pub fn ferror(stream: *mut FILE) -> c_int;
pub fn perror(s: *const c_char);
pub fn atoi(s: *const c_char) -> c_int;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "strtod$UNIX2003"
- )]
pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double;
pub fn strtol(
s: *const c_char,
@@ -1052,10 +1031,6 @@ extern {
pub fn exit(status: c_int) -> !;
// pub fn _exit(status: c_int) -> !;
pub fn atexit(cb: extern fn()) -> c_int;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "system$UNIX2003"
- )]
pub fn system(s: *const c_char) -> c_int;
pub fn getenv(s: *const c_char) -> *mut c_char;
@@ -1089,10 +1064,6 @@ extern {
) -> c_int;
pub fn strlen(cs: *const c_char) -> size_t;
pub fn strnlen(cs: *const c_char, maxlen: size_t) -> size_t;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "strerror$UNIX2003"
- )]
pub fn strerror(n: c_int) -> *mut c_char;
pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t;
@@ -1119,9 +1090,7 @@ extern {
}
extern {
- #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam50")]
pub fn getpwnam(name: *const ::c_char) -> *mut passwd;
- #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid50")]
pub fn getpwuid(uid: ::uid_t) -> *mut passwd;
pub fn fprintf(
@@ -1147,29 +1116,12 @@ extern {
-> ::c_int;
pub fn getchar_unlocked() -> ::c_int;
pub fn putchar_unlocked(c: ::c_int) -> ::c_int;
-
pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int;
-
pub fn pclose(stream: *mut ::FILE) -> ::c_int;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "fdopen$UNIX2003"
- )]
pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE;
pub fn fileno(stream: *mut ::FILE) -> ::c_int;
-
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "open$UNIX2003"
- )]
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "creat$UNIX2003"
- )]
pub fn creat(path: *const c_char, mode: mode_t) -> ::c_int;
-
pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
-
pub fn rewinddir(dirp: *mut ::DIR);
pub fn openat(
@@ -1192,8 +1144,6 @@ extern {
group: ::gid_t,
flags: ::c_int,
) -> ::c_int;
- #[cfg_attr(target_os = "macos", link_name = "fstatat$INODE64")]
- #[cfg_attr(target_os = "freebsd", link_name = "fstatat@FBSD_1.1")]
pub fn fstatat(
dirfd: ::c_int,
pathname: *const ::c_char,
@@ -1234,10 +1184,6 @@ extern {
pub fn alarm(seconds: ::c_uint) -> ::c_uint;
pub fn fchdir(dirfd: ::c_int) -> ::c_int;
pub fn chown(path: *const c_char, uid: uid_t, gid: gid_t) -> ::c_int;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "lchown$UNIX2003"
- )]
pub fn lchown(path: *const c_char, uid: uid_t, gid: gid_t) -> ::c_int;
pub fn execl(path: *const c_char, arg0: *const c_char, ...) -> ::c_int;
pub fn execle(
@@ -1282,39 +1228,13 @@ extern {
pub fn tcsetpgrp(fd: ::c_int, pgrp: ::pid_t) -> ::c_int;
pub fn ttyname(fd: ::c_int) -> *mut c_char;
pub fn wait(status: *mut ::c_int) -> pid_t;
- /*
- pub fn pread(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
- offset: off_t) -> ::ssize_t;
- #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
- link_name = "pwrite$UNIX2003")]
- pub fn pwrite(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
- offset: off_t) -> ::ssize_t;
- */
pub fn umask(mask: mode_t) -> mode_t;
-
- // #[cfg_attr(target_os = "netbsd", link_name = "__utime50")]
- // pub fn utime(file: *const c_char, buf: *const utimbuf) -> ::c_int;
-
- /*
- #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
- link_name = "kill$UNIX2003")]
- pub fn kill(pid: pid_t, sig: ::c_int) -> ::c_int;
- */
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "killpg$UNIX2003"
- )]
pub fn killpg(pgrp: pid_t, sig: ::c_int) -> ::c_int;
-
pub fn mlock(addr: *const ::c_void, len: ::size_t) -> ::c_int;
pub fn munlock(addr: *const ::c_void, len: ::size_t) -> ::c_int;
pub fn mlockall(flags: ::c_int) -> ::c_int;
pub fn munlockall() -> ::c_int;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "mmap$UNIX2003"
- )]
pub fn mmap(
addr: *mut ::c_void,
len: ::size_t,
@@ -1323,10 +1243,6 @@ extern {
fd: ::c_int,
offset: off_t,
) -> *mut ::c_void;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "munmap$UNIX2003"
- )]
pub fn munmap(addr: *mut ::c_void, len: ::size_t) -> ::c_int;
pub fn if_nametoindex(ifname: *const c_char) -> ::c_uint;
@@ -1337,28 +1253,10 @@ extern {
pub fn truncate(path: *const c_char, length: off_t) -> ::c_int;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "getrlimit$UNIX2003"
- )]
pub fn getrlimit(resource: ::c_int, rlim: *mut rlimit) -> ::c_int;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "setrlimit$UNIX2003"
- )]
pub fn setrlimit(resource: ::c_int, rlim: *const rlimit) -> ::c_int;
- // #[cfg_attr(target_os = "netbsd", link_name = "__getrusage50")]
- // pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int;
-
- /*
- #[cfg_attr(any(target_os = "macos", target_os = "ios"),
- link_name = "realpath$DARWIN_EXTSN")]
- pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char)
- -> *mut ::c_char;
- */
pub fn flock(fd: ::c_int, operation: ::c_int) -> ::c_int;
- #[cfg_attr(target_os = "netbsd", link_name = "__gettimeofday50")]
pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int;
pub fn pthread_exit(value: *mut ::c_void);
pub fn pthread_attr_setdetachstate(
@@ -1378,7 +1276,6 @@ extern {
oldact: *mut sigaction,
) -> ::c_int;
- #[cfg_attr(target_os = "netbsd", link_name = "__utimes50")]
pub fn utimes(
filename: *const ::c_char,
times: *const ::timeval,
@@ -1391,67 +1288,27 @@ extern {
) -> *mut ::c_void;
pub fn dlclose(handle: *mut ::c_void) -> ::c_int;
pub fn res_init() -> ::c_int;
- /*
- #[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")]
- pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
- #[cfg_attr(target_os = "netbsd", link_name = "__localtime_r50")]
- pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
- #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
- link_name = "mktime$UNIX2003")]
- #[cfg_attr(target_os = "netbsd", link_name = "__mktime50")]
- pub fn mktime(tm: *mut tm) -> time_t;
- #[cfg_attr(target_os = "netbsd", link_name = "__time50")]
- pub fn time(time: *mut time_t) -> time_t;
- #[cfg_attr(target_os = "netbsd", link_name = "__gmtime50")]
- pub fn gmtime(time_p: *const time_t) -> *mut tm;
- #[cfg_attr(target_os = "netbsd", link_name = "__locatime50")]
- pub fn localtime(time_p: *const time_t) -> *mut tm;
- */
- #[cfg_attr(target_os = "netbsd", link_name = "__difftime50")]
pub fn difftime(time1: time_t, time0: time_t) -> ::c_double;
- #[cfg_attr(target_os = "netbsd", link_name = "__mknod50")]
- #[cfg_attr(target_os = "freebsd", link_name = "mknod@FBSD_1.0")]
pub fn mknod(
pathname: *const ::c_char,
mode: ::mode_t,
dev: ::dev_t,
) -> ::c_int;
pub fn gethostname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
- // pub fn getservbyname(name: *const ::c_char,
- // proto: *const ::c_char) -> *mut servent;
- // pub fn getprotobyname(name: *const ::c_char) -> *mut protoent;
- // pub fn getprotobynumber(proto: ::c_int) -> *mut protoent;
pub fn chroot(name: *const ::c_char) -> ::c_int;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "usleep$UNIX2003"
- )]
pub fn usleep(secs: ::c_uint) -> ::c_int;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "putenv$UNIX2003"
- )]
pub fn putenv(string: *mut c_char) -> ::c_int;
- #[cfg_attr(target_os = "netbsd", link_name = "__select50")]
- // pub fn select(nfds: ::c_int,
- // readfs: *mut fd_set,
- // writefds: *mut fd_set,
- // errorfds: *mut fd_set,
- // timeout: *mut timeval) -> ::c_int;
- #[cfg_attr(target_os = "netbsd", link_name = "__setlocale50")]
pub fn setlocale(
category: ::c_int,
locale: *const ::c_char,
) -> *mut ::c_char;
- // pub fn localeconv() -> *mut lconv;
pub fn sigprocmask(
how: ::c_int,
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;
pub fn getsid(pid: pid_t) -> pid_t;
@@ -1464,10 +1321,6 @@ extern {
whence: ::c_int,
) -> ::c_int;
pub fn ftello(stream: *mut ::FILE) -> ::off_t;
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "tcdrain$UNIX2003"
- )]
pub fn tcdrain(fd: ::c_int) -> ::c_int;
pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int;
pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int;
@@ -1481,12 +1334,7 @@ extern {
pub fn openlog(ident: *const ::c_char, logopt: ::c_int, facility: ::c_int);
pub fn closelog();
pub fn setlogmask(maskpri: ::c_int) -> ::c_int;
- #[cfg_attr(target_os = "macos", link_name = "syslog$DARWIN_EXTSN")]
pub fn syslog(priority: ::c_int, message: *const ::c_char, ...);
- #[cfg_attr(
- all(target_os = "macos", target_arch = "x86"),
- link_name = "nice$UNIX2003"
- )]
pub fn nice(incr: ::c_int) -> ::c_int;
pub fn grantpt(fd: ::c_int) -> ::c_int;
@@ -2141,6 +1989,7 @@ extern {
pub fn raise(__signo: ::c_int) -> ::c_int;
// taskLibCommon.h
pub fn taskIdSelf() -> ::TASK_ID;
+ pub fn taskDelay(ticks: ::_Vx_ticks_t) -> ::c_int;
// rtpLibCommon.h
pub fn rtpInfoGet(rtpId: ::RTP_ID, rtpStruct: *mut ::RTP_DESC) -> ::c_int;
@@ -2167,6 +2016,12 @@ extern {
iov: *const ::iovec,
iovcnt: ::c_int,
) -> ::ssize_t;
+
+ // randomNumGen.h
+ pub fn randBytes(buf: *mut c_uchar, length: c_int) -> c_int;
+ pub fn randABytes(buf: *mut c_uchar, length: c_int) -> c_int;
+ pub fn randUBytes(buf: *mut c_uchar, length: c_int) -> c_int;
+ pub fn randSecure() -> c_int;
}
pub fn dladdr(addr: *const ::c_void, info: *mut Dl_info) -> ::c_int {