diff options
Diffstat (limited to 'vendor/libc/src/unix/linux_like')
41 files changed, 484 insertions, 204 deletions
diff --git a/vendor/libc/src/unix/linux_like/android/mod.rs b/vendor/libc/src/unix/linux_like/android/mod.rs index 40fbb607a..98a9d9b2b 100644 --- a/vendor/libc/src/unix/linux_like/android/mod.rs +++ b/vendor/libc/src/unix/linux_like/android/mod.rs @@ -1224,6 +1224,9 @@ pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1; pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2; pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL; +pub const PTHREAD_EXPLICIT_SCHED: ::c_int = 0; +pub const PTHREAD_INHERIT_SCHED: ::c_int = 1; + // stdio.h pub const RENAME_NOREPLACE: ::c_int = 1; pub const RENAME_EXCHANGE: ::c_int = 2; @@ -1559,6 +1562,7 @@ pub const RLIMIT_MSGQUEUE: ::c_int = 12; pub const RLIMIT_NICE: ::c_int = 13; pub const RLIMIT_RTPRIO: ::c_int = 14; +#[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: ::c_int = 16; pub const RLIM_INFINITY: ::rlim_t = !0; @@ -1703,6 +1707,7 @@ pub const REG_BACKR: ::c_int = 1024; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const CBAUD: ::tcflag_t = 0o0010017; pub const TAB1: ::tcflag_t = 0x00000800; @@ -2740,6 +2745,7 @@ pub const ALG_SET_IV: ::c_int = 2; pub const ALG_SET_OP: ::c_int = 3; pub const ALG_SET_AEAD_ASSOCLEN: ::c_int = 4; pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5; +pub const ALG_SET_DRBG_ENTROPY: ::c_int = 6; pub const ALG_OP_DECRYPT: ::c_int = 0; pub const ALG_OP_ENCRYPT: ::c_int = 1; @@ -3494,6 +3500,12 @@ extern "C" { attr: *const ::pthread_attr_t, guardsize: *mut ::size_t, ) -> ::c_int; + pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; + pub fn pthread_attr_getinheritsched( + attr: *const ::pthread_attr_t, + flag: *mut ::c_int, + ) -> ::c_int; + pub fn pthread_attr_setinheritsched(attr: *mut ::pthread_attr_t, flag: ::c_int) -> ::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( @@ -3697,6 +3709,20 @@ extern "C" { needle: *const ::c_void, needlelen: ::size_t, ) -> *mut ::c_void; + pub fn fread_unlocked( + buf: *mut ::c_void, + size: ::size_t, + nobj: ::size_t, + stream: *mut ::FILE, + ) -> ::size_t; + pub fn fwrite_unlocked( + buf: *const ::c_void, + size: ::size_t, + nobj: ::size_t, + stream: *mut ::FILE, + ) -> ::size_t; + pub fn fflush_unlocked(stream: *mut ::FILE) -> ::c_int; + pub fn fgets_unlocked(buf: *mut ::c_char, size: ::c_int, stream: *mut ::FILE) -> *mut ::c_char; } cfg_if! { diff --git a/vendor/libc/src/unix/linux_like/emscripten/lfs64.rs b/vendor/libc/src/unix/linux_like/emscripten/lfs64.rs new file mode 100644 index 000000000..1616cc904 --- /dev/null +++ b/vendor/libc/src/unix/linux_like/emscripten/lfs64.rs @@ -0,0 +1,213 @@ +// In-sync with ../linux/musl/lfs64.rs except for fallocate64, prlimit64 and sendfile64 + +#[inline] +pub unsafe extern "C" fn creat64(path: *const ::c_char, mode: ::mode_t) -> ::c_int { + ::creat(path, mode) +} + +#[inline] +pub unsafe extern "C" fn fgetpos64(stream: *mut ::FILE, pos: *mut ::fpos64_t) -> ::c_int { + ::fgetpos(stream, pos as *mut _) +} + +#[inline] +pub unsafe extern "C" fn fopen64(pathname: *const ::c_char, mode: *const ::c_char) -> *mut ::FILE { + ::fopen(pathname, mode) +} + +#[inline] +pub unsafe extern "C" fn freopen64( + pathname: *const ::c_char, + mode: *const ::c_char, + stream: *mut ::FILE, +) -> *mut ::FILE { + ::freopen(pathname, mode, stream) +} + +#[inline] +pub unsafe extern "C" fn fseeko64( + stream: *mut ::FILE, + offset: ::off64_t, + whence: ::c_int, +) -> ::c_int { + ::fseeko(stream, offset, whence) +} + +#[inline] +pub unsafe extern "C" fn fsetpos64(stream: *mut ::FILE, pos: *const ::fpos64_t) -> ::c_int { + ::fsetpos(stream, pos as *mut _) +} + +#[inline] +pub unsafe extern "C" fn fstat64(fildes: ::c_int, buf: *mut ::stat64) -> ::c_int { + ::fstat(fildes, buf as *mut _) +} + +#[inline] +pub unsafe extern "C" fn fstatat64( + fd: ::c_int, + path: *const ::c_char, + buf: *mut ::stat64, + flag: ::c_int, +) -> ::c_int { + ::fstatat(fd, path, buf as *mut _, flag) +} + +#[inline] +pub unsafe extern "C" fn fstatfs64(fd: ::c_int, buf: *mut ::statfs64) -> ::c_int { + ::fstatfs(fd, buf as *mut _) +} + +#[inline] +pub unsafe extern "C" fn fstatvfs64(fd: ::c_int, buf: *mut ::statvfs64) -> ::c_int { + ::fstatvfs(fd, buf as *mut _) +} + +#[inline] +pub unsafe extern "C" fn ftello64(stream: *mut ::FILE) -> ::off64_t { + ::ftello(stream) +} + +#[inline] +pub unsafe extern "C" fn ftruncate64(fd: ::c_int, length: ::off64_t) -> ::c_int { + ::ftruncate(fd, length) +} + +#[inline] +pub unsafe extern "C" fn getrlimit64(resource: ::c_int, rlim: *mut ::rlimit64) -> ::c_int { + ::getrlimit(resource, rlim as *mut _) +} + +#[inline] +pub unsafe extern "C" fn lseek64(fd: ::c_int, offset: ::off64_t, whence: ::c_int) -> ::off64_t { + ::lseek(fd, offset, whence) +} + +#[inline] +pub unsafe extern "C" fn lstat64(path: *const ::c_char, buf: *mut ::stat64) -> ::c_int { + ::lstat(path, buf as *mut _) +} + +#[inline] +pub unsafe extern "C" fn mmap64( + addr: *mut ::c_void, + length: ::size_t, + prot: ::c_int, + flags: ::c_int, + fd: ::c_int, + offset: ::off64_t, +) -> *mut ::c_void { + ::mmap(addr, length, prot, flags, fd, offset) +} + +// These functions are variadic in the C ABI since the `mode` argument is "optional". Variadic +// `extern "C"` functions are unstable in Rust so we cannot write a shim function for these +// entrypoints. See https://github.com/rust-lang/rust/issues/44930. +// +// These aliases are mostly fine though, neither function takes a LFS64-namespaced type as an +// argument, nor do their names clash with any declared types. +pub use open as open64; +pub use openat as openat64; + +#[inline] +pub unsafe extern "C" fn posix_fadvise64( + fd: ::c_int, + offset: ::off64_t, + len: ::off64_t, + advice: ::c_int, +) -> ::c_int { + ::posix_fadvise(fd, offset, len, advice) +} + +#[inline] +pub unsafe extern "C" fn posix_fallocate64( + fd: ::c_int, + offset: ::off64_t, + len: ::off64_t, +) -> ::c_int { + ::posix_fallocate(fd, offset, len) +} + +#[inline] +pub unsafe extern "C" fn pread64( + fd: ::c_int, + buf: *mut ::c_void, + count: ::size_t, + offset: ::off64_t, +) -> ::ssize_t { + ::pread(fd, buf, count, offset) +} + +#[inline] +pub unsafe extern "C" fn preadv64( + fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + offset: ::off64_t, +) -> ::ssize_t { + ::preadv(fd, iov, iovcnt, offset) +} + +#[inline] +pub unsafe extern "C" fn pwrite64( + fd: ::c_int, + buf: *const ::c_void, + count: ::size_t, + offset: ::off64_t, +) -> ::ssize_t { + ::pwrite(fd, buf, count, offset) +} + +#[inline] +pub unsafe extern "C" fn pwritev64( + fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + offset: ::off64_t, +) -> ::ssize_t { + ::pwritev(fd, iov, iovcnt, offset) +} + +#[inline] +pub unsafe extern "C" fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64 { + ::readdir(dirp) as *mut _ +} + +#[inline] +pub unsafe extern "C" fn readdir64_r( + dirp: *mut ::DIR, + entry: *mut ::dirent64, + result: *mut *mut ::dirent64, +) -> ::c_int { + ::readdir_r(dirp, entry as *mut _, result as *mut _) +} + +#[inline] +pub unsafe extern "C" fn setrlimit64(resource: ::c_int, rlim: *const ::rlimit64) -> ::c_int { + ::setrlimit(resource, rlim as *mut _) +} + +#[inline] +pub unsafe extern "C" fn stat64(pathname: *const ::c_char, statbuf: *mut ::stat64) -> ::c_int { + ::stat(pathname, statbuf as *mut _) +} + +#[inline] +pub unsafe extern "C" fn statfs64(pathname: *const ::c_char, buf: *mut ::statfs64) -> ::c_int { + ::statfs(pathname, buf as *mut _) +} + +#[inline] +pub unsafe extern "C" fn statvfs64(path: *const ::c_char, buf: *mut ::statvfs64) -> ::c_int { + ::statvfs(path, buf as *mut _) +} + +#[inline] +pub unsafe extern "C" fn tmpfile64() -> *mut ::FILE { + ::tmpfile() +} + +#[inline] +pub unsafe extern "C" fn truncate64(path: *const ::c_char, length: ::off64_t) -> ::c_int { + ::truncate(path, length) +} diff --git a/vendor/libc/src/unix/linux_like/emscripten/mod.rs b/vendor/libc/src/unix/linux_like/emscripten/mod.rs index c0d707184..1c9e4e6f5 100644 --- a/vendor/libc/src/unix/linux_like/emscripten/mod.rs +++ b/vendor/libc/src/unix/linux_like/emscripten/mod.rs @@ -5,10 +5,6 @@ pub type dev_t = u32; pub type socklen_t = u32; pub type pthread_t = c_ulong; pub type mode_t = u32; -pub type ino64_t = u64; -pub type off64_t = i64; -pub type blkcnt64_t = i32; -pub type rlim64_t = u64; pub type shmatt_t = ::c_ulong; pub type mqd_t = ::c_int; pub type msgqnum_t = ::c_ulong; @@ -29,11 +25,23 @@ pub type blkcnt_t = i32; pub type blksize_t = c_long; pub type fsblkcnt_t = u32; pub type fsfilcnt_t = u32; -pub type rlim_t = ::c_ulonglong; +pub type rlim_t = u64; pub type c_long = i32; pub type c_ulong = u32; pub type nlink_t = u32; +pub type ino64_t = ::ino_t; +pub type off64_t = ::off_t; +pub type blkcnt64_t = ::blkcnt_t; +pub type rlim64_t = ::rlim_t; + +pub type rlimit64 = ::rlimit; +pub type flock64 = ::flock; +pub type stat64 = ::stat; +pub type statfs64 = ::statfs; +pub type statvfs64 = ::statvfs; +pub type dirent64 = ::dirent; + #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum fpos64_t {} // FIXME: fill this out with a struct impl ::Copy for fpos64_t {} @@ -44,11 +52,6 @@ impl ::Clone for fpos64_t { } s! { - pub struct rlimit64 { - pub rlim_cur: rlim64_t, - pub rlim_max: rlim64_t, - } - pub struct glob_t { pub gl_pathc: ::size_t, pub gl_pathv: *mut *mut c_char, @@ -223,14 +226,6 @@ s! { pub l_pid: ::pid_t, } - pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, - } - pub struct pthread_attr_t { __size: [u32; 11] } @@ -283,31 +278,6 @@ s! { pub st_ino: ::ino_t, } - pub struct stat64 { - pub st_dev: ::dev_t, - #[cfg(not(emscripten_new_stat_abi))] - __st_dev_padding: ::c_int, - #[cfg(not(emscripten_new_stat_abi))] - __st_ino_truncated: ::c_long, - 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, - #[cfg(not(emscripten_new_stat_abi))] - __st_rdev_padding: ::c_int, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - 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_ino: ::ino_t, - } - pub struct stack_t { pub ss_sp: *mut ::c_void, pub ss_flags: ::c_int, @@ -370,37 +340,6 @@ s! { _align: [usize; 0], } - 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, - pub f_blocks: u32, - pub f_bfree: u32, - pub f_bavail: u32, - pub f_files: u32, - pub f_ffree: u32, - pub f_favail: u32, - pub f_fsid: ::c_ulong, - __f_unused: ::c_int, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], - } - pub struct arpd_request { pub req: ::c_ushort, pub ip: u32, @@ -420,14 +359,6 @@ s_no_extra_traits! { pub d_name: [::c_char; 256], } - pub struct dirent64 { - pub d_ino: ::ino64_t, - pub d_off: ::off64_t, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], - } - pub struct sysinfo { pub uptime: ::c_ulong, pub loads: [::c_ulong; 3], @@ -491,41 +422,6 @@ cfg_if! { } } - impl PartialEq for dirent64 { - fn eq(&self, other: &dirent64) -> bool { - self.d_ino == other.d_ino - && self.d_off == other.d_off - && self.d_reclen == other.d_reclen - && self.d_type == other.d_type - && self - .d_name - .iter() - .zip(other.d_name.iter()) - .all(|(a,b)| a == b) - } - } - impl Eq for dirent64 {} - impl ::fmt::Debug for dirent64 { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { - f.debug_struct("dirent64") - .field("d_ino", &self.d_ino) - .field("d_off", &self.d_off) - .field("d_reclen", &self.d_reclen) - .field("d_type", &self.d_type) - // FIXME: .field("d_name", &self.d_name) - .finish() - } - } - impl ::hash::Hash for dirent64 { - fn hash<H: ::hash::Hasher>(&self, state: &mut H) { - self.d_ino.hash(state); - self.d_off.hash(state); - self.d_reclen.hash(state); - self.d_type.hash(state); - self.d_name.hash(state); - } - } - impl PartialEq for sysinfo { fn eq(&self, other: &sysinfo) -> bool { self.uptime == other.uptime @@ -1334,7 +1230,10 @@ pub const POSIX_FADV_NOREUSE: ::c_int = 5; pub const POSIX_MADV_DONTNEED: ::c_int = 0; pub const RLIM_INFINITY: ::rlim_t = !0; +#[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIMIT_NLIMITS: ::c_int = 15; +#[allow(deprecated)] +#[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: ::c_int = RLIMIT_NLIMITS; pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; @@ -1763,8 +1662,6 @@ safe_f! { } extern "C" { - pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int; - pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int; pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; @@ -1785,17 +1682,6 @@ extern "C" { pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::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 posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; @@ -1892,6 +1778,10 @@ extern "C" { pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; } +// Alias <foo> to <foo>64 to mimic glibc's LFS64 support +mod lfs64; +pub use self::lfs64::*; + cfg_if! { if #[cfg(libc_align)] { #[macro_use] diff --git a/vendor/libc/src/unix/linux_like/linux/arch/generic/mod.rs b/vendor/libc/src/unix/linux_like/linux/arch/generic/mod.rs index 19d5e7b39..10e1fcca6 100644 --- a/vendor/libc/src/unix/linux_like/linux/arch/generic/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/arch/generic/mod.rs @@ -257,6 +257,8 @@ cfg_if! { pub const RLIMIT_NICE: ::__rlimit_resource_t = 13; pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14; pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15; + #[allow(deprecated)] + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS; } else if #[cfg(any(target_env = "musl", target_env = "ohos"))] { @@ -277,16 +279,21 @@ cfg_if! { pub const RLIMIT_NICE: ::c_int = 13; pub const RLIMIT_RTPRIO: ::c_int = 14; pub const RLIMIT_RTTIME: ::c_int = 15; + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: ::c_int = 15; + #[allow(deprecated)] + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS; } } cfg_if! { if #[cfg(target_env = "gnu")] { + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16; } else if #[cfg(target_env = "uclibc")] { + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: ::__rlimit_resource_t = 15; } } diff --git a/vendor/libc/src/unix/linux_like/linux/arch/mips/mod.rs b/vendor/libc/src/unix/linux_like/linux/arch/mips/mod.rs index 975e334de..6c0aecf8c 100644 --- a/vendor/libc/src/unix/linux_like/linux/arch/mips/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/arch/mips/mod.rs @@ -237,6 +237,8 @@ cfg_if! { pub const RLIMIT_NICE: ::__rlimit_resource_t = 13; pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14; pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15; + #[allow(deprecated)] + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS; } else if #[cfg(target_env = "musl")] { @@ -257,7 +259,10 @@ cfg_if! { pub const RLIMIT_NICE: ::c_int = 13; pub const RLIMIT_RTPRIO: ::c_int = 14; pub const RLIMIT_RTTIME: ::c_int = 15; + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: ::c_int = 15; + #[allow(deprecated)] + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS; pub const RLIM_INFINITY: ::rlim_t = !0; } @@ -265,8 +270,10 @@ cfg_if! { cfg_if! { if #[cfg(target_env = "gnu")] { + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16; } else if #[cfg(target_env = "uclibc")] { + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: ::__rlimit_resource_t = 15; } } diff --git a/vendor/libc/src/unix/linux_like/linux/arch/powerpc/mod.rs b/vendor/libc/src/unix/linux_like/linux/arch/powerpc/mod.rs index 64c3eaab5..584be5b6c 100644 --- a/vendor/libc/src/unix/linux_like/linux/arch/powerpc/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/arch/powerpc/mod.rs @@ -215,7 +215,10 @@ cfg_if! { pub const RLIMIT_NICE: ::__rlimit_resource_t = 13; pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14; pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15; + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16; + #[allow(deprecated)] + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS; } else if #[cfg(target_env = "musl")] { @@ -236,7 +239,10 @@ cfg_if! { pub const RLIMIT_NICE: ::c_int = 13; pub const RLIMIT_RTPRIO: ::c_int = 14; pub const RLIMIT_RTTIME: ::c_int = 15; + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: ::c_int = 15; + #[allow(deprecated)] + #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS; } } diff --git a/vendor/libc/src/unix/linux_like/linux/arch/sparc/mod.rs b/vendor/libc/src/unix/linux_like/linux/arch/sparc/mod.rs index da3e388e3..c7813aa46 100644 --- a/vendor/libc/src/unix/linux_like/linux/arch/sparc/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/arch/sparc/mod.rs @@ -216,7 +216,10 @@ pub const RLIMIT_MSGQUEUE: ::__rlimit_resource_t = 12; pub const RLIMIT_NICE: ::__rlimit_resource_t = 13; pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14; pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15; +#[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16; +#[allow(deprecated)] +#[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS; cfg_if! { diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b32/arm/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b32/arm/mod.rs index fd690a17e..9b3a2ff86 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b32/arm/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b32/arm/mod.rs @@ -341,6 +341,7 @@ pub const SOCK_DGRAM: ::c_int = 2; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const POLLWRNORM: ::c_short = 0x100; pub const POLLWRBAND: ::c_short = 0x200; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b32/csky/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b32/csky/mod.rs index c1234845e..9807cea83 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b32/csky/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b32/csky/mod.rs @@ -290,6 +290,7 @@ pub const SOCK_DGRAM: ::c_int = 2; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const POLLWRNORM: ::c_short = 0x100; pub const POLLWRBAND: ::c_short = 0x200; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs index 69725ee7c..8ca7d3d21 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs @@ -293,6 +293,7 @@ pub const PTRACE_SYSEMU_SINGLESTEP: ::c_uint = 32; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const POLLWRNORM: ::c_short = 0x100; pub const POLLWRBAND: ::c_short = 0x200; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b32/mips/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b32/mips/mod.rs index 6a03f0ba8..fa2707500 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b32/mips/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b32/mips/mod.rs @@ -719,6 +719,7 @@ pub const RTLD_NOLOAD: ::c_int = 0x8; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const SIGSTKSZ: ::size_t = 8192; pub const MINSIGSTKSZ: ::size_t = 2048; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b32/powerpc.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b32/powerpc.rs index e70b216bf..dd5732e0d 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b32/powerpc.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b32/powerpc.rs @@ -293,6 +293,7 @@ pub const SOCK_DGRAM: ::c_int = 2; pub const MCL_CURRENT: ::c_int = 0x2000; pub const MCL_FUTURE: ::c_int = 0x4000; +pub const MCL_ONFAULT: ::c_int = 0x8000; pub const POLLWRNORM: ::c_short = 0x100; pub const POLLWRBAND: ::c_short = 0x200; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs index f3b130cbc..65b7aaa78 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs @@ -393,6 +393,7 @@ pub const EISNAM: ::c_int = 120; pub const EREMOTEIO: ::c_int = 121; pub const MCL_CURRENT: ::c_int = 1; pub const MCL_FUTURE: ::c_int = 2; +pub const MCL_ONFAULT: ::c_int = 4; pub const SIGSTKSZ: ::size_t = 8192; pub const MINSIGSTKSZ: ::size_t = 2048; pub const CBAUD: ::tcflag_t = 4111; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs index 57ad9fe8e..da9cf29c4 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs @@ -363,6 +363,7 @@ pub const EREMOTEIO: ::c_int = 121; pub const MCL_CURRENT: ::c_int = 0x2000; pub const MCL_FUTURE: ::c_int = 0x4000; +pub const MCL_ONFAULT: ::c_int = 0x8000; pub const SIGSTKSZ: ::size_t = 16384; pub const MINSIGSTKSZ: ::size_t = 4096; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b32/x86/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b32/x86/mod.rs index 93622387e..a3531c141 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b32/x86/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b32/x86/mod.rs @@ -507,6 +507,7 @@ pub const PTRACE_SYSEMU_SINGLESTEP: ::c_uint = 32; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const POLLWRNORM: ::c_short = 0x100; pub const POLLWRBAND: ::c_short = 0x200; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs index f9aed99b2..206283e22 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs @@ -423,6 +423,7 @@ pub const EDEADLOCK: ::c_int = 35; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const SIGSTKSZ: ::size_t = 16384; pub const MINSIGSTKSZ: ::size_t = 5120; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs index ea59181bc..3e1719a76 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs @@ -264,6 +264,21 @@ align_const! { }; } +pub const HWCAP_CPUCFG: ::c_ulong = 1 << 0; +pub const HWCAP_LAM: ::c_ulong = 1 << 1; +pub const HWCAP_UAL: ::c_ulong = 1 << 2; +pub const HWCAP_FPU: ::c_ulong = 1 << 3; +pub const HWCAP_LSX: ::c_ulong = 1 << 4; +pub const HWCAP_LASX: ::c_ulong = 1 << 5; +pub const HWCAP_CRC32: ::c_ulong = 1 << 6; +pub const HWCAP_COMPLEX: ::c_ulong = 1 << 7; +pub const HWCAP_CRYPTO: ::c_ulong = 1 << 8; +pub const HWCAP_LVZ: ::c_ulong = 1 << 9; +pub const HWCAP_LBT_X86: ::c_ulong = 1 << 10; +pub const HWCAP_LBT_ARM: ::c_ulong = 1 << 11; +pub const HWCAP_LBT_MIPS: ::c_ulong = 1 << 12; +pub const HWCAP_PTW: ::c_ulong = 1 << 13; + pub const SYS_io_setup: ::c_long = 0; pub const SYS_io_destroy: ::c_long = 1; pub const SYS_io_submit: ::c_long = 2; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs index 66b29a8aa..f7b52be80 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs @@ -823,6 +823,7 @@ pub const RTLD_NOLOAD: ::c_int = 0x8; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const SIGSTKSZ: ::size_t = 8192; pub const MINSIGSTKSZ: ::size_t = 2048; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs index 2b225e480..3088c25a2 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs @@ -473,6 +473,7 @@ pub const EREMOTEIO: ::c_int = 121; pub const MCL_CURRENT: ::c_int = 0x2000; pub const MCL_FUTURE: ::c_int = 0x4000; +pub const MCL_ONFAULT: ::c_int = 0x8000; pub const SIGSTKSZ: ::size_t = 0x4000; pub const MINSIGSTKSZ: ::size_t = 4096; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs index c65a562ac..8e06a135b 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs @@ -432,6 +432,7 @@ pub const PTRACE_GETREGS: ::c_uint = 12; pub const PTRACE_SETREGS: ::c_uint = 13; pub const MCL_CURRENT: ::c_int = 1; pub const MCL_FUTURE: ::c_int = 2; +pub const MCL_ONFAULT: ::c_int = 4; pub const SIGSTKSZ: ::size_t = 8192; pub const MINSIGSTKSZ: ::size_t = 2048; pub const CBAUD: ::tcflag_t = 4111; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b64/s390x.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b64/s390x.rs index c2c4f31cf..61ee2dcc9 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b64/s390x.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b64/s390x.rs @@ -481,6 +481,7 @@ pub const PTRACE_DETACH: ::c_uint = 17; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const EFD_NONBLOCK: ::c_int = 0x800; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs index 2427c7a0a..de2f0d6e4 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs @@ -444,6 +444,7 @@ pub const EREMOTEIO: ::c_int = 121; pub const MCL_CURRENT: ::c_int = 0x2000; pub const MCL_FUTURE: ::c_int = 0x4000; +pub const MCL_ONFAULT: ::c_int = 0x8000; pub const SIGSTKSZ: ::size_t = 16384; pub const MINSIGSTKSZ: ::size_t = 4096; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs index e6307e282..9b2aac5c2 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs @@ -651,6 +651,7 @@ pub const PR_SPEC_INDIRECT_BRANCH: ::c_int = 1; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const SIGSTKSZ: ::size_t = 8192; pub const MINSIGSTKSZ: ::size_t = 2048; diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/mod.rs b/vendor/libc/src/unix/linux_like/linux/gnu/mod.rs index 2d74087e9..377b9f122 100644 --- a/vendor/libc/src/unix/linux_like/linux/gnu/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/gnu/mod.rs @@ -718,11 +718,6 @@ pub const SOCK_SEQPACKET: ::c_int = 5; pub const SOCK_DCCP: ::c_int = 6; pub const SOCK_PACKET: ::c_int = 10; -pub const FAN_MARK_INODE: ::c_uint = 0x0000_0000; -pub const FAN_MARK_MOUNT: ::c_uint = 0x0000_0010; -// NOTE: FAN_MARK_FILESYSTEM requires Linux Kernel >= 4.20.0 -pub const FAN_MARK_FILESYSTEM: ::c_uint = 0x0000_0100; - pub const AF_IB: ::c_int = 27; pub const AF_MPLS: ::c_int = 28; pub const AF_NFC: ::c_int = 39; @@ -857,6 +852,8 @@ pub const PTRACE_SEIZE: ::c_uint = 0x4206; pub const PTRACE_INTERRUPT: ::c_uint = 0x4207; pub const PTRACE_LISTEN: ::c_uint = 0x4208; pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209; +pub const PTRACE_GETSIGMASK: ::c_uint = 0x420a; +pub const PTRACE_SETSIGMASK: ::c_uint = 0x420b; pub const PTRACE_GET_SYSCALL_INFO: ::c_uint = 0x420e; pub const PTRACE_SYSCALL_INFO_NONE: ::__u8 = 0; pub const PTRACE_SYSCALL_INFO_ENTRY: ::__u8 = 1; @@ -944,6 +941,11 @@ pub const NT_PRFPXREG: ::c_int = 20; pub const ELFOSABI_ARM_AEABI: u8 = 64; +// linux/sched.h +pub const CLONE_NEWTIME: ::c_int = 0x80; +pub const CLONE_CLEAR_SIGHAND: ::c_int = 0x100000000; +pub const CLONE_INTO_CGROUP: ::c_int = 0x200000000; + // linux/keyctl.h pub const KEYCTL_DH_COMPUTE: u32 = 23; pub const KEYCTL_PKEY_QUERY: u32 = 24; @@ -1024,7 +1026,17 @@ pub const STATX_ATTR_DAX: ::c_int = 0x00200000; pub const SOMAXCONN: ::c_int = 4096; -//sys/timex.h +// linux/mount.h +pub const MOVE_MOUNT_F_SYMLINKS: ::c_uint = 0x00000001; +pub const MOVE_MOUNT_F_AUTOMOUNTS: ::c_uint = 0x00000002; +pub const MOVE_MOUNT_F_EMPTY_PATH: ::c_uint = 0x00000004; +pub const MOVE_MOUNT_T_SYMLINKS: ::c_uint = 0x00000010; +pub const MOVE_MOUNT_T_AUTOMOUNTS: ::c_uint = 0x00000020; +pub const MOVE_MOUNT_T_EMPTY_PATH: ::c_uint = 0x00000040; +pub const MOVE_MOUNT_SET_GROUP: ::c_uint = 0x00000100; +pub const MOVE_MOUNT_BENEATH: ::c_uint = 0x00000200; + +// sys/timex.h pub const ADJ_OFFSET: ::c_uint = 0x0001; pub const ADJ_FREQUENCY: ::c_uint = 0x0002; pub const ADJ_MAXERROR: ::c_uint = 0x0004; @@ -1093,6 +1105,8 @@ pub const GLOB_TILDE: ::c_int = 1 << 12; pub const GLOB_ONLYDIR: ::c_int = 1 << 13; pub const GLOB_TILDE_CHECK: ::c_int = 1 << 14; +pub const MADV_COLLAPSE: ::c_int = 25; + cfg_if! { if #[cfg(any( target_arch = "arm", @@ -1389,6 +1403,17 @@ extern "C" { buf: *mut ::c_char, buflen: ::c_int, ) -> *mut ::mntent; + + pub fn execveat( + dirfd: ::c_int, + pathname: *const ::c_char, + argv: *const *mut c_char, + envp: *const *mut c_char, + flags: ::c_int, + ) -> ::c_int; + + // Added in `glibc` 2.34 + pub fn close_range(first: ::c_uint, last: ::c_uint, flags: ::c_int) -> ::c_int; } cfg_if! { diff --git a/vendor/libc/src/unix/linux_like/linux/mod.rs b/vendor/libc/src/unix/linux_like/linux/mod.rs index 4f9ae623a..224300a64 100644 --- a/vendor/libc/src/unix/linux_like/linux/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/mod.rs @@ -14,6 +14,7 @@ pub type nl_item = ::c_int; pub type idtype_t = ::c_uint; pub type loff_t = ::c_longlong; pub type pthread_key_t = ::c_uint; +pub type pthread_once_t = ::c_int; pub type pthread_spinlock_t = ::c_int; pub type __u8 = ::c_uchar; @@ -791,6 +792,23 @@ s_no_extra_traits! { pub ifr_ifru: ::sockaddr, } + #[cfg(libc_union)] + pub union __c_anonymous_ifc_ifcu { + pub ifcu_buf: *mut ::c_char, + pub ifcu_req: *mut ::ifreq, + } + + /* Structure used in SIOCGIFCONF request. Used to retrieve interface + configuration for machine (useful for programs which must know all + networks accessible). */ + pub struct ifconf { + pub ifc_len: ::c_int, /* Size of buffer. */ + #[cfg(libc_union)] + pub ifc_ifcu: __c_anonymous_ifc_ifcu, + #[cfg(not(libc_union))] + pub ifc_ifcu: *mut ::ifreq, + } + pub struct hwtstamp_config { pub flags: ::c_int, pub tx_type: ::c_int, @@ -1228,6 +1246,23 @@ cfg_if! { } } + #[cfg(libc_union)] + impl ::fmt::Debug for __c_anonymous_ifc_ifcu { + fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + f.debug_struct("ifr_ifru") + .field("ifcu_buf", unsafe { &self.ifcu_buf }) + .field("ifcu_req", unsafe { &self.ifcu_req }) + .finish() + } + } + impl ::fmt::Debug for ifconf { + fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + f.debug_struct("ifconf") + .field("ifc_len", &self.ifc_len) + .field("ifc_ifcu", &self.ifc_ifcu) + .finish() + } + } impl ::fmt::Debug for hwtstamp_config { fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { f.debug_struct("hwtstamp_config") @@ -1829,6 +1864,8 @@ pub const IFLA_INFO_SLAVE_DATA: ::c_ushort = 5; // linux/if_tun.h pub const IFF_TUN: ::c_int = 0x0001; pub const IFF_TAP: ::c_int = 0x0002; +pub const IFF_NAPI: ::c_int = 0x0010; +pub const IFF_NAPI_FRAGS: ::c_int = 0x0020; pub const IFF_NO_PI: ::c_int = 0x1000; // Read queue size pub const TUN_READQ_SIZE: ::c_short = 500; @@ -1846,6 +1883,18 @@ pub const IFF_DETACH_QUEUE: ::c_int = 0x0400; // read-only flag pub const IFF_PERSIST: ::c_int = 0x0800; pub const IFF_NOFILTER: ::c_int = 0x1000; +// Socket options +pub const TUN_TX_TIMESTAMP: ::c_int = 1; +// Features for GSO (TUNSETOFFLOAD) +pub const TUN_F_CSUM: ::c_ushort = 0x01; /* You can hand me unchecksummed packets. */ +pub const TUN_F_TSO4: ::c_ushort = 0x02; /* I can handle TSO for IPv4 packets */ +pub const TUN_F_TSO6: ::c_ushort = 0x04; /* I can handle TSO for IPv6 packets */ +pub const TUN_F_TSO_ECN: ::c_ushort = 0x08; /* I can handle TSO with ECN bits. */ +pub const TUN_F_UFO: ::c_ushort = 0x10; /* I can handle UFO packets */ +// Protocol info prepended to the packets (when IFF_NO_PI is not set) +pub const TUN_PKT_STRIP: ::c_int = 0x0001; +// Accept all multicast packets +pub const TUN_FLT_ALLMULTI: ::c_int = 0x0001; // Since Linux 3.1 pub const SEEK_DATA: ::c_int = 3; @@ -1903,6 +1952,7 @@ align_const! { size: [0; __SIZEOF_PTHREAD_RWLOCK_T], }; } +pub const PTHREAD_ONCE_INIT: pthread_once_t = 0; pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1; pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2; @@ -2766,6 +2816,7 @@ pub const SIOCGIFMEM: ::c_ulong = 0x0000891F; pub const SIOCSIFMEM: ::c_ulong = 0x00008920; pub const SIOCGIFMTU: ::c_ulong = 0x00008921; pub const SIOCSIFMTU: ::c_ulong = 0x00008922; +pub const SIOCSIFNAME: ::c_ulong = 0x00008923; pub const SIOCSIFHWADDR: ::c_ulong = 0x00008924; pub const SIOCGIFENCAP: ::c_ulong = 0x00008925; pub const SIOCSIFENCAP: ::c_ulong = 0x00008926; @@ -3193,6 +3244,8 @@ pub const ALG_SET_IV: ::c_int = 2; pub const ALG_SET_OP: ::c_int = 3; pub const ALG_SET_AEAD_ASSOCLEN: ::c_int = 4; pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5; +pub const ALG_SET_DRBG_ENTROPY: ::c_int = 6; +pub const ALG_SET_KEY_BY_KEY_SERIAL: ::c_int = 7; pub const ALG_OP_DECRYPT: ::c_int = 0; pub const ALG_OP_ENCRYPT: ::c_int = 1; @@ -3549,20 +3602,33 @@ pub const UINPUT_MAX_NAME_SIZE: usize = 80; // uapi/linux/fanotify.h pub const FAN_ACCESS: u64 = 0x0000_0001; pub const FAN_MODIFY: u64 = 0x0000_0002; +pub const FAN_ATTRIB: u64 = 0x0000_0004; pub const FAN_CLOSE_WRITE: u64 = 0x0000_0008; pub const FAN_CLOSE_NOWRITE: u64 = 0x0000_0010; pub const FAN_OPEN: u64 = 0x0000_0020; +pub const FAN_MOVED_FROM: u64 = 0x0000_0040; +pub const FAN_MOVED_TO: u64 = 0x0000_0080; +pub const FAN_CREATE: u64 = 0x0000_0100; +pub const FAN_DELETE: u64 = 0x0000_0200; +pub const FAN_DELETE_SELF: u64 = 0x0000_0400; +pub const FAN_MOVE_SELF: u64 = 0x0000_0800; +pub const FAN_OPEN_EXEC: u64 = 0x0000_1000; pub const FAN_Q_OVERFLOW: u64 = 0x0000_4000; +pub const FAN_FS_ERROR: u64 = 0x0000_8000; pub const FAN_OPEN_PERM: u64 = 0x0001_0000; pub const FAN_ACCESS_PERM: u64 = 0x0002_0000; - -pub const FAN_ONDIR: u64 = 0x4000_0000; +pub const FAN_OPEN_EXEC_PERM: u64 = 0x0004_0000; pub const FAN_EVENT_ON_CHILD: u64 = 0x0800_0000; +pub const FAN_RENAME: u64 = 0x1000_0000; + +pub const FAN_ONDIR: u64 = 0x4000_0000; + pub const FAN_CLOSE: u64 = FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE; +pub const FAN_MOVE: u64 = FAN_MOVED_FROM | FAN_MOVED_TO; pub const FAN_CLOEXEC: ::c_uint = 0x0000_0001; pub const FAN_NONBLOCK: ::c_uint = 0x0000_0002; @@ -3573,6 +3639,18 @@ pub const FAN_CLASS_PRE_CONTENT: ::c_uint = 0x0000_0008; pub const FAN_UNLIMITED_QUEUE: ::c_uint = 0x0000_0010; pub const FAN_UNLIMITED_MARKS: ::c_uint = 0x0000_0020; +pub const FAN_ENABLE_AUDIT: ::c_uint = 0x0000_0040; + +pub const FAN_REPORT_PIDFD: ::c_uint = 0x0000_0080; +pub const FAN_REPORT_TID: ::c_uint = 0x0000_0100; +pub const FAN_REPORT_FID: ::c_uint = 0x0000_0200; +pub const FAN_REPORT_DIR_FID: ::c_uint = 0x0000_0400; +pub const FAN_REPORT_NAME: ::c_uint = 0x0000_0800; +pub const FAN_REPORT_TARGET_FID: ::c_uint = 0x0000_1000; + +pub const FAN_REPORT_DFID_NAME: ::c_uint = FAN_REPORT_DIR_FID | FAN_REPORT_NAME; +pub const FAN_REPORT_DFID_NAME_TARGET: ::c_uint = + FAN_REPORT_DFID_NAME | FAN_REPORT_FID | FAN_REPORT_TARGET_FID; pub const FAN_MARK_ADD: ::c_uint = 0x0000_0001; pub const FAN_MARK_REMOVE: ::c_uint = 0x0000_0002; @@ -3581,13 +3659,37 @@ pub const FAN_MARK_ONLYDIR: ::c_uint = 0x0000_0008; pub const FAN_MARK_IGNORED_MASK: ::c_uint = 0x0000_0020; pub const FAN_MARK_IGNORED_SURV_MODIFY: ::c_uint = 0x0000_0040; pub const FAN_MARK_FLUSH: ::c_uint = 0x0000_0080; +pub const FAN_MARK_EVICTABLE: ::c_uint = 0x0000_0200; +pub const FAN_MARK_IGNORE: ::c_uint = 0x0000_0100; + +pub const FAN_MARK_INODE: ::c_uint = 0x0000_0000; +pub const FAN_MARK_MOUNT: ::c_uint = 0x0000_0010; +pub const FAN_MARK_FILESYSTEM: ::c_uint = 0x0000_0100; + +pub const FAN_MARK_IGNORE_SURV: ::c_uint = FAN_MARK_IGNORE | FAN_MARK_IGNORED_SURV_MODIFY; pub const FANOTIFY_METADATA_VERSION: u8 = 3; +pub const FAN_EVENT_INFO_TYPE_FID: u8 = 1; +pub const FAN_EVENT_INFO_TYPE_DFID_NAME: u8 = 2; +pub const FAN_EVENT_INFO_TYPE_DFID: u8 = 3; +pub const FAN_EVENT_INFO_TYPE_PIDFD: u8 = 4; +pub const FAN_EVENT_INFO_TYPE_ERROR: u8 = 5; + +pub const FAN_EVENT_INFO_TYPE_OLD_DFID_NAME: u8 = 10; +pub const FAN_EVENT_INFO_TYPE_NEW_DFID_NAME: u8 = 12; + +pub const FAN_RESPONSE_INFO_NONE: u8 = 0; +pub const FAN_RESPONSE_INFO_AUDIT_RULE: u8 = 1; + pub const FAN_ALLOW: u32 = 0x01; pub const FAN_DENY: u32 = 0x02; +pub const FAN_AUDIT: u32 = 0x10; +pub const FAN_INFO: u32 = 0x20; pub const FAN_NOFD: ::c_int = -1; +pub const FAN_NOPIDFD: ::c_int = FAN_NOFD; +pub const FAN_EPIDFD: ::c_int = -2; pub const FUTEX_WAIT: ::c_int = 0; pub const FUTEX_WAKE: ::c_int = 1; @@ -4581,6 +4683,7 @@ extern "C" { attr: *const ::pthread_attr_t, guardsize: *mut ::size_t, ) -> ::c_int; + pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::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( @@ -4769,7 +4872,7 @@ extern "C" { newfd: ::c_int, ) -> ::c_int; pub fn fread_unlocked( - ptr: *mut ::c_void, + buf: *mut ::c_void, size: ::size_t, nobj: ::size_t, stream: *mut ::FILE, @@ -4847,6 +4950,8 @@ extern "C" { longindex: *mut ::c_int, ) -> ::c_int; + pub fn pthread_once(control: *mut pthread_once_t, routine: extern "C" fn()) -> ::c_int; + pub fn copy_file_range( fd_in: ::c_int, off_in: *mut ::off64_t, diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b32/arm/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b32/arm/mod.rs index c47fa2c4c..8225f26ad 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/b32/arm/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/b32/arm/mod.rs @@ -235,6 +235,7 @@ pub const O_LARGEFILE: ::c_int = 0o400000; pub const MADV_SOFT_OFFLINE: ::c_int = 101; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const CBAUD: ::tcflag_t = 0o0010017; pub const TAB1: ::c_int = 0x00000800; pub const TAB2: ::c_int = 0x00001000; @@ -311,8 +312,6 @@ 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; @@ -326,7 +325,6 @@ pub const MAP_SYNC: ::c_int = 0x080000; pub const SOCK_STREAM: ::c_int = 1; pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_SEQPACKET: ::c_int = 5; pub const EDEADLK: ::c_int = 35; pub const ENAMETOOLONG: ::c_int = 36; @@ -451,9 +449,6 @@ pub const F_GETOWN: ::c_int = 9; pub const F_SETLK: ::c_int = 13; pub const F_SETLKW: ::c_int = 14; pub const F_SETOWN: ::c_int = 8; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; pub const VEOF: usize = 4; pub const VEOL: usize = 11; diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b32/hexagon.rs b/vendor/libc/src/unix/linux_like/linux/musl/b32/hexagon.rs index f83d208d5..089c06f85 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/b32/hexagon.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/b32/hexagon.rs @@ -225,9 +225,6 @@ pub const F_GETOWN_EX: ::c_int = 16; pub const F_GETSIG: ::c_int = 11; pub const F_LINUX_SPECIFIC_BASE: ::c_int = 1024; pub const FLUSHO: ::c_int = 4096; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; pub const F_OWNER_PGRP: ::c_int = 2; pub const F_OWNER_PID: ::c_int = 1; pub const F_OWNER_TID: ::c_int = 0; @@ -265,7 +262,6 @@ pub const PF_FILE: ::c_int = 1; pub const PF_KCM: ::c_int = 41; pub const PF_MAX: ::c_int = 43; pub const PF_QIPCRTR: ::c_int = 42; -#[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const SA_ONSTACK: ::c_int = 0x08000000; pub const SA_SIGINFO: ::c_int = 0x00000004; pub const SA_NOCLDWAIT: ::c_int = 0x00000002; @@ -295,8 +291,6 @@ pub const SIG_SETMASK: ::c_int = 2; // FIXME check these pub const SIG_BLOCK: ::c_int = 0x000000; pub const SIG_UNBLOCK: ::c_int = 0x01; pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_NONBLOCK: ::c_int = 2048; -pub const SOCK_SEQPACKET: ::c_int = 5; pub const SOCK_STREAM: ::c_int = 1; pub const SOL_CAIF: ::c_int = 278; pub const SOL_IUCV: ::c_int = 277; diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b32/mips/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b32/mips/mod.rs index d09b8278e..2fb405bbc 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/b32/mips/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/b32/mips/mod.rs @@ -174,6 +174,7 @@ pub const O_LARGEFILE: ::c_int = 0x2000; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const CBAUD: ::tcflag_t = 0o0010017; pub const TAB1: ::c_int = 0x00000800; pub const TAB2: ::c_int = 0x00001000; @@ -250,8 +251,6 @@ pub const O_SYNC: ::c_int = 0o40020; pub const O_RSYNC: ::c_int = 0o40020; pub const O_DSYNC: ::c_int = 0o020; -pub const SOCK_NONBLOCK: ::c_int = 0o200; - pub const MAP_ANON: ::c_int = 0x800; pub const MAP_GROWSDOWN: ::c_int = 0x1000; pub const MAP_DENYWRITE: ::c_int = 0x2000; @@ -351,7 +350,6 @@ pub const ERFKILL: ::c_int = 167; pub const SOCK_STREAM: ::c_int = 2; pub const SOCK_DGRAM: ::c_int = 1; -pub const SOCK_SEQPACKET: ::c_int = 5; pub const SA_ONSTACK: ::c_int = 0x08000000; pub const SA_SIGINFO: ::c_int = 8; @@ -388,9 +386,6 @@ pub const F_GETOWN: ::c_int = 23; pub const F_SETLK: ::c_int = 34; pub const F_SETLKW: ::c_int = 35; pub const F_SETOWN: ::c_int = 24; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; pub const VEOF: usize = 16; pub const VEOL: usize = 17; diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b32/powerpc.rs b/vendor/libc/src/unix/linux_like/linux/musl/b32/powerpc.rs index ec4f2047e..bdf25455f 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/b32/powerpc.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/b32/powerpc.rs @@ -167,6 +167,7 @@ pub const O_LARGEFILE: ::c_int = 0x10000; pub const MCL_CURRENT: ::c_int = 0x2000; pub const MCL_FUTURE: ::c_int = 0x4000; +pub const MCL_ONFAULT: ::c_int = 0x8000; pub const CBAUD: ::tcflag_t = 0o0000377; pub const TAB1: ::c_int = 0x00000400; pub const TAB2: ::c_int = 0x00000800; @@ -243,8 +244,6 @@ 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; @@ -262,7 +261,6 @@ pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 0x1e; pub const SOCK_STREAM: ::c_int = 1; pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_SEQPACKET: ::c_int = 5; pub const EDEADLK: ::c_int = 35; pub const ENAMETOOLONG: ::c_int = 36; @@ -385,9 +383,6 @@ pub const F_GETOWN: ::c_int = 9; pub const F_SETLK: ::c_int = 13; pub const F_SETLKW: ::c_int = 14; pub const F_SETOWN: ::c_int = 8; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; pub const VEOF: usize = 4; pub const VEOL: usize = 6; diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs index bf7a4f59c..f963f645a 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs @@ -323,9 +323,11 @@ pub const POLLWRBAND: ::c_short = 512; pub const O_ASYNC: ::c_int = 8192; pub const O_NDELAY: ::c_int = 2048; pub const EFD_NONBLOCK: ::c_int = 2048; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; pub const F_SETOWN: ::c_int = 8; +pub const F_GETOWN: ::c_int = 9; +pub const F_GETLK: ::c_int = 12; +pub const F_SETLK: ::c_int = 13; +pub const F_SETLKW: ::c_int = 14; pub const SFD_NONBLOCK: ::c_int = 2048; pub const TCSANOW: ::c_int = 0; pub const TCSADRAIN: ::c_int = 1; @@ -353,6 +355,7 @@ pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; pub const O_DIRECT: ::c_int = 16384; pub const O_DIRECTORY: ::c_int = 65536; +pub const O_LARGEFILE: ::c_int = 0o0100000; pub const O_NOFOLLOW: ::c_int = 131072; pub const MAP_HUGETLB: ::c_int = 262144; pub const MAP_LOCKED: ::c_int = 8192; @@ -376,6 +379,7 @@ pub const FIONCLEX: ::c_int = 21584; pub const FIONBIO: ::c_int = 21537; pub const MCL_CURRENT: ::c_int = 1; pub const MCL_FUTURE: ::c_int = 2; +pub const MCL_ONFAULT: ::c_int = 4; pub const SIGSTKSZ: ::size_t = 8192; pub const MINSIGSTKSZ: ::size_t = 2048; pub const CBAUD: ::tcflag_t = 4111; diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b32/x86/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b32/x86/mod.rs index aaca917fa..944d6e787 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/b32/x86/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/b32/x86/mod.rs @@ -224,6 +224,7 @@ pub const O_LARGEFILE: ::c_int = 0o0100000; pub const MADV_SOFT_OFFLINE: ::c_int = 101; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const CBAUD: ::tcflag_t = 0o0010017; pub const TAB1: ::c_int = 0x00000800; pub const TAB2: ::c_int = 0x00001000; @@ -300,8 +301,6 @@ 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; @@ -315,7 +314,6 @@ pub const MAP_SYNC: ::c_int = 0x080000; pub const SOCK_STREAM: ::c_int = 1; pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_SEQPACKET: ::c_int = 5; pub const EDEADLK: ::c_int = 35; pub const ENAMETOOLONG: ::c_int = 36; @@ -441,9 +439,6 @@ pub const F_GETOWN: ::c_int = 9; pub const F_SETLK: ::c_int = 13; pub const F_SETLKW: ::c_int = 14; pub const F_SETOWN: ::c_int = 8; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; pub const VEOF: usize = 4; pub const VEOL: usize = 11; diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs index 14b4bc6d6..54e072b31 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs @@ -250,9 +250,6 @@ 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 F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; pub const VEOF: usize = 4; @@ -567,6 +564,7 @@ pub const SYS_set_mempolicy_home_node: ::c_long = 450; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const CBAUD: ::tcflag_t = 0o0010017; pub const TAB1: ::c_int = 0x00000800; pub const TAB2: ::c_int = 0x00001000; diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b64/mips64.rs b/vendor/libc/src/unix/linux_like/linux/musl/b64/mips64.rs index 22ac91690..18fa6c664 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/b64/mips64.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/b64/mips64.rs @@ -612,12 +612,10 @@ 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 F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const CBAUD: ::tcflag_t = 0o0010017; pub const TAB1: ::tcflag_t = 0x00000800; diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs index f437355d9..05586cdb4 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs @@ -134,10 +134,6 @@ pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; -pub const SOCK_NONBLOCK: ::c_int = 2048; - -pub const SOCK_SEQPACKET: ::c_int = 5; - extern "C" { pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; } diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b64/powerpc64.rs b/vendor/libc/src/unix/linux_like/linux/musl/b64/powerpc64.rs index c9bd94135..202abe879 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/b64/powerpc64.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/b64/powerpc64.rs @@ -212,9 +212,6 @@ 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 F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; pub const VEOF: usize = 4; @@ -626,6 +623,7 @@ pub const FLUSHO: ::tcflag_t = 0x00800000; pub const MCL_CURRENT: ::c_int = 0x2000; pub const MCL_FUTURE: ::c_int = 0x4000; +pub const MCL_ONFAULT: ::c_int = 0x8000; pub const CBAUD: ::tcflag_t = 0xff; pub const TAB1: ::c_int = 0x400; pub const TAB2: ::c_int = 0x800; diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs index 9e9dbf6c8..393f54d3f 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs @@ -469,6 +469,9 @@ pub const SYS_faccessat2: ::c_long = 439; pub const SYS_process_madvise: ::c_long = 440; pub const SYS_epoll_pwait2: ::c_long = 441; pub const SYS_mount_setattr: ::c_long = 442; +pub const SYS_landlock_create_ruleset: ::c_long = 444; +pub const SYS_landlock_add_rule: ::c_long = 445; +pub const SYS_landlock_restrict_self: ::c_long = 446; pub const O_APPEND: ::c_int = 1024; pub const O_DIRECT: ::c_int = 0x4000; @@ -604,9 +607,6 @@ 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 F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; pub const VEOF: usize = 4; @@ -630,6 +630,7 @@ pub const MAP_SYNC: ::c_int = 0x080000; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const CBAUD: ::tcflag_t = 0o0010017; pub const TAB1: ::c_int = 0x00000800; pub const TAB2: ::c_int = 0x00001000; diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b64/s390x.rs b/vendor/libc/src/unix/linux_like/linux/musl/b64/s390x.rs index f338dcc54..aa4cbf87f 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/b64/s390x.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/b64/s390x.rs @@ -290,15 +290,13 @@ pub const EXTPROC: ::tcflag_t = 0x00010000; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const F_GETLK: ::c_int = 5; pub const F_GETOWN: ::c_int = 9; pub const F_SETOWN: ::c_int = 8; pub const F_SETLK: ::c_int = 6; pub const F_SETLKW: ::c_int = 7; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; pub const VTIME: usize = 5; pub const VSWTC: usize = 7; diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs index 9decf91bc..4d1786800 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs @@ -805,9 +805,6 @@ 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 F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; pub const VEOF: usize = 4; @@ -831,6 +828,7 @@ pub const MAP_SYNC: ::c_int = 0x080000; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const CBAUD: ::tcflag_t = 0o0010017; pub const TAB1: ::c_int = 0x00000800; pub const TAB2: ::c_int = 0x00001000; diff --git a/vendor/libc/src/unix/linux_like/linux/musl/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/mod.rs index 4c6053389..b67d55e99 100644 --- a/vendor/libc/src/unix/linux_like/linux/musl/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/musl/mod.rs @@ -512,6 +512,10 @@ pub const ECOMM: ::c_int = 70; pub const EPROTO: ::c_int = 71; pub const EDOTDOT: ::c_int = 73; +pub const F_OFD_GETLK: ::c_int = 36; +pub const F_OFD_SETLK: ::c_int = 37; +pub const F_OFD_SETLKW: ::c_int = 38; + pub const F_RDLCK: ::c_int = 0; pub const F_WRLCK: ::c_int = 1; pub const F_UNLCK: ::c_int = 2; @@ -541,7 +545,9 @@ pub const POSIX_MADV_DONTNEED: ::c_int = 4; pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; +pub const SOCK_SEQPACKET: ::c_int = 5; pub const SOCK_DCCP: ::c_int = 6; +pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK; pub const SOCK_PACKET: ::c_int = 10; pub const SOMAXCONN: ::c_int = 128; @@ -585,11 +591,8 @@ pub const PTRACE_SEIZE: ::c_int = 0x4206; pub const PTRACE_INTERRUPT: ::c_int = 0x4207; pub const PTRACE_LISTEN: ::c_int = 0x4208; pub const PTRACE_PEEKSIGINFO: ::c_int = 0x4209; - -pub const FAN_MARK_INODE: ::c_uint = 0x0000_0000; -pub const FAN_MARK_MOUNT: ::c_uint = 0x0000_0010; -// NOTE: FAN_MARK_FILESYSTEM requires Linux Kernel >= 4.20.0 -pub const FAN_MARK_FILESYSTEM: ::c_uint = 0x0000_0100; +pub const PTRACE_GETSIGMASK: ::c_uint = 0x420a; +pub const PTRACE_SETSIGMASK: ::c_uint = 0x420b; pub const AF_IB: ::c_int = 27; pub const AF_MPLS: ::c_int = 28; diff --git a/vendor/libc/src/unix/linux_like/linux/uclibc/mod.rs b/vendor/libc/src/unix/linux_like/linux/uclibc/mod.rs index 4a01e0cd8..4afb98e95 100644 --- a/vendor/libc/src/unix/linux_like/linux/uclibc/mod.rs +++ b/vendor/libc/src/unix/linux_like/linux/uclibc/mod.rs @@ -109,6 +109,7 @@ impl siginfo_t { pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_ONFAULT: ::c_int = 0x0004; pub const SIGEV_THREAD_ID: ::c_int = 4; @@ -245,9 +246,6 @@ pub const EDEADLOCK: ::c_int = EDEADLK; pub const EXTA: ::c_uint = B19200; pub const EXTB: ::c_uint = B38400; pub const EXTPROC: ::tcflag_t = 0200000; -pub const FAN_MARK_FILESYSTEM: ::c_int = 0x00000100; -pub const FAN_MARK_INODE: ::c_int = 0x00000000; -pub const FAN_MARK_MOUNT: ::c_int = 0x10; pub const FOPEN_MAX: ::c_int = 16; pub const F_GETOWN: ::c_int = 9; pub const F_OFD_GETLK: ::c_int = 36; @@ -282,7 +280,9 @@ pub const PF_NFC: ::c_int = 39; pub const PF_VSOCK: ::c_int = 40; pub const POSIX_MADV_DONTNEED: ::c_int = 4; pub const PTRACE_EVENT_STOP: ::c_int = 128; +pub const PTRACE_GETSIGMASK: ::c_uint = 0x420a; pub const PTRACE_PEEKSIGINFO: ::c_int = 0x4209; +pub const PTRACE_SETSIGMASK: ::c_uint = 0x420b; pub const RTLD_NOLOAD: ::c_int = 0x00004; pub const RUSAGE_THREAD: ::c_int = 1; pub const SHM_EXEC: ::c_int = 0100000; diff --git a/vendor/libc/src/unix/linux_like/mod.rs b/vendor/libc/src/unix/linux_like/mod.rs index 3117c18b8..26fd68de4 100644 --- a/vendor/libc/src/unix/linux_like/mod.rs +++ b/vendor/libc/src/unix/linux_like/mod.rs @@ -1783,10 +1783,10 @@ extern "C" { // LFS64 extensions // -// * musl has 64-bit versions only so aliases the LFS64 symbols to the standard ones +// * musl and Emscripten has 64-bit versions only so aliases the LFS64 symbols to the standard ones // * ulibc doesn't have preadv64/pwritev64 cfg_if! { - if #[cfg(not(target_env = "musl"))] { + if #[cfg(not(any(target_env = "musl", target_os = "emscripten")))] { extern "C" { pub fn fstatfs64(fd: ::c_int, buf: *mut statfs64) -> ::c_int; pub fn statvfs64(path: *const ::c_char, buf: *mut statvfs64) -> ::c_int; @@ -1844,7 +1844,7 @@ cfg_if! { } cfg_if! { - if #[cfg(not(any(target_env = "uclibc", target_env = "musl")))] { + if #[cfg(not(any(target_env = "uclibc", target_env = "musl", target_os = "emscripten")))] { extern "C" { pub fn preadv64( fd: ::c_int, |