summaryrefslogtreecommitdiffstats
path: root/vendor/libc/src/unix
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/libc/src/unix')
-rw-r--r--vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs2
-rw-r--r--vendor/libc/src/unix/bsd/apple/mod.rs7
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs13
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs22
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs3
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs3
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs10
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs10
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs52
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/riscv64.rs22
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/mod.rs1
-rw-r--r--vendor/libc/src/unix/bsd/mod.rs17
-rw-r--r--vendor/libc/src/unix/bsd/netbsdlike/mod.rs8
-rw-r--r--vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs41
-rw-r--r--vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs28
-rw-r--r--vendor/libc/src/unix/haiku/mod.rs15
-rw-r--r--vendor/libc/src/unix/linux_like/android/mod.rs258
-rw-r--r--vendor/libc/src/unix/linux_like/linux/arch/generic/mod.rs4
-rw-r--r--vendor/libc/src/unix/linux_like/linux/gnu/b64/aarch64/align.rs7
-rw-r--r--vendor/libc/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs1
-rw-r--r--vendor/libc/src/unix/linux_like/linux/gnu/b64/loongarch64/align.rs33
-rw-r--r--vendor/libc/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs19
-rw-r--r--vendor/libc/src/unix/linux_like/linux/gnu/mod.rs19
-rw-r--r--vendor/libc/src/unix/linux_like/linux/mod.rs112
-rw-r--r--vendor/libc/src/unix/linux_like/linux/musl/mod.rs15
-rw-r--r--vendor/libc/src/unix/linux_like/linux/uclibc/arm/mod.rs2
-rw-r--r--vendor/libc/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs1
-rw-r--r--vendor/libc/src/unix/linux_like/mod.rs6
-rw-r--r--vendor/libc/src/unix/mod.rs22
-rw-r--r--vendor/libc/src/unix/redox/mod.rs30
-rw-r--r--vendor/libc/src/unix/solarish/compat.rs49
-rw-r--r--vendor/libc/src/unix/solarish/illumos.rs2
-rw-r--r--vendor/libc/src/unix/solarish/mod.rs56
-rw-r--r--vendor/libc/src/unix/solarish/solaris.rs48
34 files changed, 815 insertions, 123 deletions
diff --git a/vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs b/vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs
index 67f0f7032..79e9ac842 100644
--- a/vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs
+++ b/vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs
@@ -6,8 +6,6 @@ s! {
}
}
-pub const CLOCK_UPTIME_RAW: ::clockid_t = 8;
-
cfg_if! {
if #[cfg(libc_align)] {
mod align;
diff --git a/vendor/libc/src/unix/bsd/apple/mod.rs b/vendor/libc/src/unix/bsd/apple/mod.rs
index ed3028695..6b391893a 100644
--- a/vendor/libc/src/unix/bsd/apple/mod.rs
+++ b/vendor/libc/src/unix/bsd/apple/mod.rs
@@ -2694,7 +2694,11 @@ pub const ABMON_11: ::nl_item = 43;
pub const ABMON_12: ::nl_item = 44;
pub const CLOCK_REALTIME: ::clockid_t = 0;
+pub const CLOCK_MONOTONIC_RAW: ::clockid_t = 4;
+pub const CLOCK_MONOTONIC_RAW_APPROX: ::clockid_t = 5;
pub const CLOCK_MONOTONIC: ::clockid_t = 6;
+pub const CLOCK_UPTIME_RAW: ::clockid_t = 8;
+pub const CLOCK_UPTIME_RAW_APPROX: ::clockid_t = 9;
pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 12;
pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 16;
@@ -5866,6 +5870,9 @@ extern "C" {
pub fn malloc_size(ptr: *const ::c_void) -> ::size_t;
pub fn malloc_good_size(size: ::size_t) -> ::size_t;
+
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
pub unsafe fn mach_task_self() -> ::mach_port_t {
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
index 418ac3dc8..70fe6e2ed 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
@@ -1409,6 +1409,16 @@ pub const MSG_FBLOCKING: ::c_int = 0x00010000;
pub const MSG_FNONBLOCKING: ::c_int = 0x00020000;
pub const MSG_FMASK: ::c_int = 0xFFFF0000;
+// sys/mount.h
+pub const MNT_NODEV: ::c_int = 0x00000010;
+pub const MNT_AUTOMOUNTED: ::c_int = 0x00000020;
+pub const MNT_TRIM: ::c_int = 0x01000000;
+pub const MNT_LOCAL: ::c_int = 0x00001000;
+pub const MNT_QUOTA: ::c_int = 0x00002000;
+pub const MNT_ROOTFS: ::c_int = 0x00004000;
+pub const MNT_USER: ::c_int = 0x00008000;
+pub const MNT_IGNORE: ::c_int = 0x00800000;
+
// utmpx entry types
pub const EMPTY: ::c_short = 0;
pub const RUN_LVL: ::c_short = 1;
@@ -1653,6 +1663,9 @@ extern "C" {
pub fn umtx_sleep(ptr: *const ::c_int, value: ::c_int, timeout: ::c_int) -> ::c_int;
pub fn umtx_wakeup(ptr: *const ::c_int, count: ::c_int) -> ::c_int;
+
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
#[link(name = "rt")]
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
index d29a8d2c7..e8be8815c 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
@@ -6,17 +6,6 @@ pub type time_t = i64;
pub type suseconds_t = i64;
pub type register_t = i64;
-// should be pub(crate), but that requires Rust 1.18.0
-cfg_if! {
- if #[cfg(libc_const_size_of)] {
- #[doc(hidden)]
- pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
- } else {
- #[doc(hidden)]
- pub const _ALIGNBYTES: usize = 8 - 1;
- }
-}
-
s_no_extra_traits! {
pub struct gpregs {
pub gp_x: [::register_t; 30],
@@ -44,6 +33,17 @@ s_no_extra_traits! {
}
}
+// should be pub(crate), but that requires Rust 1.18.0
+cfg_if! {
+ if #[cfg(libc_const_size_of)] {
+ #[doc(hidden)]
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
+ } else {
+ #[doc(hidden)]
+ pub const _ALIGNBYTES: usize = 8 - 1;
+ }
+}
+
cfg_if! {
if #[cfg(feature = "extra_traits")] {
impl PartialEq for gpregs {
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs
index aaa043584..563c0f936 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs
@@ -463,6 +463,9 @@ extern "C" {
) -> ::c_int;
pub fn fdatasync(fd: ::c_int) -> ::c_int;
+
+ pub fn dirname(path: *const ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *const ::c_char) -> *mut ::c_char;
}
cfg_if! {
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs
index e7f8ad780..df00b6c1d 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs
@@ -487,6 +487,9 @@ extern "C" {
pub fn setproctitle_fast(fmt: *const ::c_char, ...);
pub fn timingsafe_bcmp(a: *const ::c_void, b: *const ::c_void, len: ::size_t) -> ::c_int;
pub fn timingsafe_memcmp(a: *const ::c_void, b: *const ::c_void, len: ::size_t) -> ::c_int;
+
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
cfg_if! {
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs
index bcd09006b..72a38dc22 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs
@@ -527,14 +527,8 @@ extern "C" {
policy: ::c_int,
) -> ::c_int;
- pub fn copy_file_range(
- infd: ::c_int,
- inoffp: *mut ::off_t,
- outfd: ::c_int,
- outoffp: *mut ::off_t,
- len: ::size_t,
- flags: ::c_uint,
- ) -> ::ssize_t;
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
#[link(name = "kvm")]
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs
index 9da669604..115b47764 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs
@@ -527,14 +527,8 @@ extern "C" {
policy: ::c_int,
) -> ::c_int;
- pub fn copy_file_range(
- infd: ::c_int,
- inoffp: *mut ::off_t,
- outfd: ::c_int,
- outoffp: *mut ::off_t,
- len: ::size_t,
- flags: ::c_uint,
- ) -> ::ssize_t;
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
#[link(name = "kvm")]
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs
index 08fd5a52d..2a4fbbf05 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -998,6 +998,15 @@ s! {
pub alloc_policy: ::c_int,
__pad: [::c_int; 10],
}
+
+ pub struct memory_type {
+ __priva: [::uintptr_t; 32],
+ __privb: [::uintptr_t; 26],
+ }
+
+ pub struct memory_type_list {
+ __priv: [::uintptr_t; 2],
+ }
}
s_no_extra_traits! {
@@ -2280,7 +2289,6 @@ pub const MNT_MULTILABEL: ::c_int = 0x04000000;
pub const MNT_NFS4ACLS: ::c_int = 0x00000010;
pub const MNT_SNAPSHOT: ::c_int = 0x01000000;
pub const MNT_UNION: ::c_int = 0x00000020;
-pub const MNT_EXPUBLIC: ::c_int = 0x20000000;
pub const MNT_NONBUSY: ::c_int = 0x04000000;
pub const SCM_CREDS2: ::c_int = 0x08;
@@ -2380,6 +2388,10 @@ pub const PROC_PROTMAX_CTL: ::c_int = 15;
pub const PROC_PROTMAX_STATUS: ::c_int = 16;
pub const PROC_STACKGAP_CTL: ::c_int = 17;
pub const PROC_STACKGAP_STATUS: ::c_int = 18;
+pub const PROC_NO_NEW_PRIVS_CTL: ::c_int = 19;
+pub const PROC_NO_NEW_PRIVS_STATUS: ::c_int = 20;
+pub const PROC_WXMAP_CTL: ::c_int = 21;
+pub const PROC_WXMAP_STATUS: ::c_int = 22;
pub const PROC_PROCCTL_MD_MIN: ::c_int = 0x10000000;
pub const PPROT_SET: ::c_int = 1;
@@ -2409,6 +2421,13 @@ pub const PROC_STACKGAP_DISABLE: ::c_int = 0x0002;
pub const PROC_STACKGAP_ENABLE_EXEC: ::c_int = 0x0004;
pub const PROC_STACKGAP_DISABLE_EXEC: ::c_int = 0x0008;
+pub const PROC_NO_NEW_PRIVS_ENABLE: ::c_int = 1;
+pub const PROC_NO_NEW_PRIVS_DISABLE: ::c_int = 2;
+
+pub const PROC_WX_MAPPINGS_PERMIT: ::c_int = 0x0001;
+pub const PROC_WX_MAPPINGS_DISALLOW_EXEC: ::c_int = 0x0002;
+pub const PROC_WXORX_ENFORCE: ::c_int = 0x80000000;
+
pub const AF_SLOW: ::c_int = 33;
pub const AF_SCLUSTER: ::c_int = 34;
pub const AF_ARP: ::c_int = 35;
@@ -3935,6 +3954,15 @@ extern "C" {
pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
pub fn aio_writev(aiocbp: *mut ::aiocb) -> ::c_int;
+ pub fn copy_file_range(
+ infd: ::c_int,
+ inoffp: *mut ::off_t,
+ outfd: ::c_int,
+ outoffp: *mut ::off_t,
+ len: ::size_t,
+ flags: ::c_uint,
+ ) -> ::ssize_t;
+
pub fn devname_r(
dev: ::dev_t,
mode: ::mode_t,
@@ -4273,8 +4301,13 @@ extern "C" {
pub fn cpuset_setid(which: cpuwhich_t, id: ::id_t, setid: ::cpusetid_t) -> ::c_int;
pub fn cap_enter() -> ::c_int;
pub fn cap_getmode(modep: *mut ::c_uint) -> ::c_int;
+ pub fn cap_fcntls_get(fd: ::c_int, fcntlrightsp: *mut u32) -> ::c_int;
+ pub fn cap_fcntls_limit(fd: ::c_int, fcntlrights: u32) -> ::c_int;
+ pub fn cap_ioctls_get(fd: ::c_int, cmds: *mut u_long, maxcmds: usize) -> isize;
+ pub fn cap_ioctls_limit(fd: ::c_int, cmds: *const u_long, ncmds: usize) -> ::c_int;
pub fn __cap_rights_init(version: ::c_int, rights: *mut cap_rights_t, ...)
-> *mut cap_rights_t;
+ pub fn __cap_rights_get(version: ::c_int, fd: ::c_int, rightsp: *mut cap_rights_t) -> ::c_int;
pub fn __cap_rights_set(rights: *mut cap_rights_t, ...) -> *mut cap_rights_t;
pub fn __cap_rights_clear(rights: *mut cap_rights_t, ...) -> *mut cap_rights_t;
pub fn __cap_rights_is_set(rights: *const cap_rights_t, ...) -> bool;
@@ -4284,6 +4317,7 @@ extern "C" {
pub fn cap_rights_remove(dst: *mut cap_rights_t, src: *const cap_rights_t)
-> *mut cap_rights_t;
pub fn cap_rights_contains(big: *const cap_rights_t, little: *const cap_rights_t) -> bool;
+ pub fn cap_sandboxed() -> bool;
pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void;
@@ -4359,6 +4393,22 @@ extern "C" {
) -> ::c_int;
}
+#[link(name = "memstat")]
+extern "C" {
+ pub fn memstat_strerror(error: ::c_int) -> *const ::c_char;
+ pub fn memstat_mtl_alloc() -> *mut memory_type_list;
+ pub fn memstat_mtl_first(list: *mut memory_type_list) -> *mut memory_type;
+ pub fn memstat_mtl_next(mtp: *mut memory_type) -> *mut memory_type;
+ pub fn memstat_mtl_find(
+ list: *mut memory_type_list,
+ allocator: ::c_int,
+ name: *const ::c_char,
+ ) -> *mut memory_type;
+ pub fn memstat_mtl_free(list: *mut memory_type_list);
+ pub fn memstat_mtl_geterror(list: *mut memory_type_list) -> ::c_int;
+ pub fn memstat_get_name(mtp: *const memory_type) -> *const ::c_char;
+}
+
#[link(name = "kvm")]
extern "C" {
pub fn kvm_dpcpu_setcpu(kd: *mut ::kvm_t, cpu: ::c_uint) -> ::c_int;
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/riscv64.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/riscv64.rs
index c91a8dfb2..f9fa1c275 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/riscv64.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/riscv64.rs
@@ -6,17 +6,6 @@ pub type time_t = i64;
pub type suseconds_t = ::c_long;
pub type register_t = i64;
-// should be pub(crate), but that requires Rust 1.18.0
-cfg_if! {
- if #[cfg(libc_const_size_of)] {
- #[doc(hidden)]
- pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
- } else {
- #[doc(hidden)]
- pub const _ALIGNBYTES: usize = 8 - 1;
- }
-}
-
s_no_extra_traits! {
pub struct gpregs {
pub gp_ra: ::register_t,
@@ -46,6 +35,17 @@ s_no_extra_traits! {
}
}
+// should be pub(crate), but that requires Rust 1.18.0
+cfg_if! {
+ if #[cfg(libc_const_size_of)] {
+ #[doc(hidden)]
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
+ } else {
+ #[doc(hidden)]
+ pub const _ALIGNBYTES: usize = 8 - 1;
+ }
+}
+
cfg_if! {
if #[cfg(feature = "extra_traits")] {
impl PartialEq for gpregs {
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/mod.rs
index db21597d9..9aefb36e4 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/mod.rs
@@ -630,6 +630,7 @@ pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
pub const MCL_CURRENT: ::c_int = 0x0001;
pub const MCL_FUTURE: ::c_int = 0x0002;
+pub const MNT_EXPUBLIC: ::c_int = 0x20000000;
pub const MNT_NOATIME: ::c_int = 0x10000000;
pub const MNT_NOCLUSTERR: ::c_int = 0x40000000;
pub const MNT_NOCLUSTERW: ::c_int = 0x80000000;
diff --git a/vendor/libc/src/unix/bsd/mod.rs b/vendor/libc/src/unix/bsd/mod.rs
index 20e203bde..d49e3c440 100644
--- a/vendor/libc/src/unix/bsd/mod.rs
+++ b/vendor/libc/src/unix/bsd/mod.rs
@@ -37,6 +37,7 @@ s! {
#[cfg(not(any(target_os = "macos",
target_os = "ios",
+ target_os = "tvos",
target_os = "watchos",
target_os = "netbsd",
target_os = "openbsd")))]
@@ -114,6 +115,13 @@ s! {
pub rm_so: regoff_t,
pub rm_eo: regoff_t,
}
+
+ pub struct option {
+ pub name: *const ::c_char,
+ pub has_arg: ::c_int,
+ pub flag: *mut ::c_int,
+ pub val: ::c_int,
+ }
}
s_no_extra_traits! {
@@ -884,10 +892,17 @@ extern "C" {
pub fn srand48(seed: ::c_long);
pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort;
pub fn lcong48(p: *mut ::c_ushort);
+ pub fn getopt_long(
+ argc: ::c_int,
+ argv: *const *mut c_char,
+ optstring: *const c_char,
+ longopts: *const option,
+ longindex: *mut ::c_int,
+ ) -> ::c_int;
}
cfg_if! {
- if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos"))] {
+ if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos"))] {
mod apple;
pub use self::apple::*;
} else if #[cfg(any(target_os = "openbsd", target_os = "netbsd"))] {
diff --git a/vendor/libc/src/unix/bsd/netbsdlike/mod.rs b/vendor/libc/src/unix/bsd/netbsdlike/mod.rs
index a7f35ef85..b71531c25 100644
--- a/vendor/libc/src/unix/bsd/netbsdlike/mod.rs
+++ b/vendor/libc/src/unix/bsd/netbsdlike/mod.rs
@@ -419,6 +419,11 @@ pub const MADV_WILLNEED: ::c_int = 3;
pub const MADV_DONTNEED: ::c_int = 4;
pub const MADV_FREE: ::c_int = 6;
+// sys/fstypes.h in NetBSD, or sys/mount.h in OpenBSD
+pub const MNT_NODEV: ::c_int = 0x00000010;
+pub const MNT_LOCAL: ::c_int = 0x00001000;
+pub const MNT_QUOTA: ::c_int = 0x00002000;
+
pub const AF_UNSPEC: ::c_int = 0;
pub const AF_LOCAL: ::c_int = 1;
pub const AF_UNIX: ::c_int = AF_LOCAL;
@@ -738,6 +743,9 @@ extern "C" {
pub fn gethostid() -> ::c_long;
pub fn sethostid(hostid: ::c_long) -> ::c_int;
pub fn ftok(path: *const ::c_char, id: ::c_int) -> ::key_t;
+
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
cfg_if! {
diff --git a/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs b/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
index bfe2de083..41f6b23d1 100644
--- a/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -1785,6 +1785,23 @@ pub const BIOCSDLT: ::c_ulong = 0x80044278;
pub const BIOCGSEESENT: ::c_ulong = 0x40044276;
pub const BIOCSSEESENT: ::c_ulong = 0x80044277;
+// <sys/fstypes.h>
+pub const MNT_UNION: ::c_int = 0x00000020;
+pub const MNT_NOCOREDUMP: ::c_int = 0x00008000;
+pub const MNT_RELATIME: ::c_int = 0x00020000;
+pub const MNT_IGNORE: ::c_int = 0x00100000;
+pub const MNT_NFS4ACLS: ::c_int = 0x00200000;
+pub const MNT_DISCARD: ::c_int = 0x00800000;
+pub const MNT_EXTATTR: ::c_int = 0x01000000;
+pub const MNT_LOG: ::c_int = 0x02000000;
+pub const MNT_NOATIME: ::c_int = 0x04000000;
+pub const MNT_AUTOMOUNTED: ::c_int = 0x10000000;
+pub const MNT_SYMPERM: ::c_int = 0x20000000;
+pub const MNT_NODEVMTIME: ::c_int = 0x40000000;
+pub const MNT_SOFTDEP: ::c_int = 0x80000000;
+pub const MNT_POSIX1EACLS: ::c_int = 0x00000800;
+pub const MNT_ACLS: ::c_int = MNT_POSIX1EACLS;
+
//<sys/timex.h>
pub const NTP_API: ::c_int = 4;
pub const MAXPHASE: ::c_long = 500000000;
@@ -2298,6 +2315,12 @@ pub const _REG_RFLAGS: ::c_int = 23;
pub const _REG_RSP: ::c_int = 24;
pub const _REG_SS: ::c_int = 25;
+// sys/xattr.h
+pub const XATTR_CREATE: ::c_int = 0x01;
+pub const XATTR_REPLACE: ::c_int = 0x02;
+// sys/extattr.h
+pub const EXTATTR_NAMESPACE_EMPTY: ::c_int = 0;
+
const_fn! {
{const} fn _ALIGN(p: usize) -> usize {
(p + _ALIGNBYTES) & !_ALIGNBYTES
@@ -2436,6 +2459,24 @@ extern "C" {
envp: *const *const ::c_char,
) -> ::c_int;
+ pub fn extattr_list_fd(
+ fd: ::c_int,
+ attrnamespace: ::c_int,
+ data: *mut ::c_void,
+ nbytes: ::size_t,
+ ) -> ::ssize_t;
+ pub fn extattr_list_file(
+ path: *const ::c_char,
+ attrnamespace: ::c_int,
+ data: *mut ::c_void,
+ nbytes: ::size_t,
+ ) -> ::ssize_t;
+ pub fn extattr_list_link(
+ path: *const ::c_char,
+ attrnamespace: ::c_int,
+ data: *mut ::c_void,
+ nbytes: ::size_t,
+ ) -> ::ssize_t;
pub fn extattr_delete_fd(
fd: ::c_int,
attrnamespace: ::c_int,
diff --git a/vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs b/vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs
index 506306e9f..3c966990a 100644
--- a/vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs
+++ b/vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs
@@ -1639,10 +1639,38 @@ pub const SF_ARCHIVED: ::c_uint = 0x00010000;
pub const SF_IMMUTABLE: ::c_uint = 0x00020000;
pub const SF_APPEND: ::c_uint = 0x00040000;
+// sys/mount.h
+pub const MNT_NOPERM: ::c_int = 0x00000020;
+pub const MNT_WXALLOWED: ::c_int = 0x00000800;
+pub const MNT_EXRDONLY: ::c_int = 0x00000080;
+pub const MNT_DEFEXPORTED: ::c_int = 0x00000200;
+pub const MNT_EXPORTANON: ::c_int = 0x00000400;
+pub const MNT_ROOTFS: ::c_int = 0x00004000;
+pub const MNT_NOATIME: ::c_int = 0x00008000;
+pub const MNT_DELEXPORT: ::c_int = 0x00020000;
+pub const MNT_STALLED: ::c_int = 0x00100000;
+pub const MNT_SWAPPABLE: ::c_int = 0x00200000;
+pub const MNT_WANTRDWR: ::c_int = 0x02000000;
+pub const MNT_SOFTDEP: ::c_int = 0x04000000;
+pub const MNT_DOOMED: ::c_int = 0x08000000;
+
+// For use with vfs_fsync and getfsstat
pub const MNT_WAIT: ::c_int = 1;
pub const MNT_NOWAIT: ::c_int = 2;
pub const MNT_LAZY: ::c_int = 3;
+pub const LC_COLLATE_MASK: ::c_int = 1 << ::LC_COLLATE;
+pub const LC_CTYPE_MASK: ::c_int = 1 << ::LC_CTYPE;
+pub const LC_MONETARY_MASK: ::c_int = 1 << ::LC_MONETARY;
+pub const LC_NUMERIC_MASK: ::c_int = 1 << ::LC_NUMERIC;
+pub const LC_TIME_MASK: ::c_int = 1 << ::LC_TIME;
+pub const LC_MESSAGES_MASK: ::c_int = 1 << ::LC_MESSAGES;
+
+const _LC_LAST: ::c_int = 7;
+pub const LC_ALL_MASK: ::c_int = (1 << _LC_LAST) - 2;
+
+pub const LC_GLOBAL_LOCALE: ::locale_t = -1isize as ::locale_t;
+
const_fn! {
{const} fn _ALIGN(p: usize) -> usize {
(p + _ALIGNBYTES) & !_ALIGNBYTES
diff --git a/vendor/libc/src/unix/haiku/mod.rs b/vendor/libc/src/unix/haiku/mod.rs
index bb2e0351b..005b1d9df 100644
--- a/vendor/libc/src/unix/haiku/mod.rs
+++ b/vendor/libc/src/unix/haiku/mod.rs
@@ -430,6 +430,13 @@ s! {
pub key: *mut ::c_char,
pub data: *mut ::c_void,
}
+
+ pub struct option {
+ pub name: *const ::c_char,
+ pub has_arg: ::c_int,
+ pub flag: *mut ::c_int,
+ pub val: ::c_int,
+ }
}
s_no_extra_traits! {
@@ -1971,7 +1978,13 @@ extern "C" {
attr: *mut posix_spawnattr_t,
sigmask: *const ::sigset_t,
) -> ::c_int;
-
+ pub fn getopt_long(
+ argc: ::c_int,
+ argv: *const *mut c_char,
+ optstring: *const c_char,
+ longopts: *const option,
+ longindex: *mut ::c_int,
+ ) -> ::c_int;
}
#[link(name = "bsd")]
diff --git a/vendor/libc/src/unix/linux_like/android/mod.rs b/vendor/libc/src/unix/linux_like/android/mod.rs
index 67e5eb52b..61885582a 100644
--- a/vendor/libc/src/unix/linux_like/android/mod.rs
+++ b/vendor/libc/src/unix/linux_like/android/mod.rs
@@ -355,6 +355,140 @@ s! {
pub flags: ::__u32,
pub nr: ::__s32,
}
+
+ // linux/input.h
+ pub struct input_event {
+ pub time: ::timeval,
+ pub type_: ::__u16,
+ pub code: ::__u16,
+ pub value: ::__s32,
+ }
+
+ pub struct input_id {
+ pub bustype: ::__u16,
+ pub vendor: ::__u16,
+ pub product: ::__u16,
+ pub version: ::__u16,
+ }
+
+ pub struct input_absinfo {
+ pub value: ::__s32,
+ pub minimum: ::__s32,
+ pub maximum: ::__s32,
+ pub fuzz: ::__s32,
+ pub flat: ::__s32,
+ pub resolution: ::__s32,
+ }
+
+ pub struct input_keymap_entry {
+ pub flags: ::__u8,
+ pub len: ::__u8,
+ pub index: ::__u16,
+ pub keycode: ::__u32,
+ pub scancode: [::__u8; 32],
+ }
+
+ pub struct input_mask {
+ pub type_: ::__u32,
+ pub codes_size: ::__u32,
+ pub codes_ptr: ::__u64,
+ }
+
+ pub struct ff_replay {
+ pub length: ::__u16,
+ pub delay: ::__u16,
+ }
+
+ pub struct ff_trigger {
+ pub button: ::__u16,
+ pub interval: ::__u16,
+ }
+
+ pub struct ff_envelope {
+ pub attack_length: ::__u16,
+ pub attack_level: ::__u16,
+ pub fade_length: ::__u16,
+ pub fade_level: ::__u16,
+ }
+
+ pub struct ff_constant_effect {
+ pub level: ::__s16,
+ pub envelope: ff_envelope,
+ }
+
+ pub struct ff_ramp_effect {
+ pub start_level: ::__s16,
+ pub end_level: ::__s16,
+ pub envelope: ff_envelope,
+ }
+
+ pub struct ff_condition_effect {
+ pub right_saturation: ::__u16,
+ pub left_saturation: ::__u16,
+
+ pub right_coeff: ::__s16,
+ pub left_coeff: ::__s16,
+
+ pub deadband: ::__u16,
+ pub center: ::__s16,
+ }
+
+ pub struct ff_periodic_effect {
+ pub waveform: ::__u16,
+ pub period: ::__u16,
+ pub magnitude: ::__s16,
+ pub offset: ::__s16,
+ pub phase: ::__u16,
+
+ pub envelope: ff_envelope,
+
+ pub custom_len: ::__u32,
+ pub custom_data: *mut ::__s16,
+ }
+
+ pub struct ff_rumble_effect {
+ pub strong_magnitude: ::__u16,
+ pub weak_magnitude: ::__u16,
+ }
+
+ pub struct ff_effect {
+ pub type_: ::__u16,
+ pub id: ::__s16,
+ pub direction: ::__u16,
+ pub trigger: ff_trigger,
+ pub replay: ff_replay,
+ // FIXME this is actually a union
+ #[cfg(target_pointer_width = "64")]
+ pub u: [u64; 4],
+ #[cfg(target_pointer_width = "32")]
+ pub u: [u32; 7],
+ }
+
+ // linux/uinput.h
+ pub struct uinput_ff_upload {
+ pub request_id: ::__u32,
+ pub retval: ::__s32,
+ pub effect: ff_effect,
+ pub old: ff_effect,
+ }
+
+ pub struct uinput_ff_erase {
+ pub request_id: ::__u32,
+ pub retval: ::__s32,
+ pub effect_id: ::__u32,
+ }
+
+ pub struct uinput_abs_setup {
+ pub code: ::__u16,
+ pub absinfo: input_absinfo,
+ }
+
+ pub struct option {
+ pub name: *const ::c_char,
+ pub has_arg: ::c_int,
+ pub flag: *mut ::c_int,
+ pub val: ::c_int,
+ }
}
s_no_extra_traits! {
@@ -417,6 +551,22 @@ s_no_extra_traits! {
pub salg_name: [::c_uchar; 64],
}
+ pub struct uinput_setup {
+ pub id: input_id,
+ pub name: [::c_char; UINPUT_MAX_NAME_SIZE],
+ pub ff_effects_max: ::__u32,
+ }
+
+ pub struct uinput_user_dev {
+ pub name: [::c_char; UINPUT_MAX_NAME_SIZE],
+ pub id: input_id,
+ pub ff_effects_max: ::__u32,
+ pub absmax: [::__s32; ABS_CNT],
+ pub absmin: [::__s32; ABS_CNT],
+ pub absfuzz: [::__s32; ABS_CNT],
+ pub absflat: [::__s32; ABS_CNT],
+ }
+
/// WARNING: The `PartialEq`, `Eq` and `Hash` implementations of this
/// type are unsound and will be removed in the future.
#[deprecated(
@@ -715,6 +865,72 @@ cfg_if! {
}
}
+ impl PartialEq for uinput_setup {
+ fn eq(&self, other: &uinput_setup) -> bool {
+ self.id == other.id
+ && self.name[..] == other.name[..]
+ && self.ff_effects_max == other.ff_effects_max
+ }
+ }
+ impl Eq for uinput_setup {}
+
+ impl ::fmt::Debug for uinput_setup {
+ fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
+ f.debug_struct("uinput_setup")
+ .field("id", &self.id)
+ .field("name", &&self.name[..])
+ .field("ff_effects_max", &self.ff_effects_max)
+ .finish()
+ }
+ }
+
+ impl ::hash::Hash for uinput_setup {
+ fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
+ self.id.hash(state);
+ self.name.hash(state);
+ self.ff_effects_max.hash(state);
+ }
+ }
+
+ impl PartialEq for uinput_user_dev {
+ fn eq(&self, other: &uinput_user_dev) -> bool {
+ self.name[..] == other.name[..]
+ && self.id == other.id
+ && self.ff_effects_max == other.ff_effects_max
+ && self.absmax[..] == other.absmax[..]
+ && self.absmin[..] == other.absmin[..]
+ && self.absfuzz[..] == other.absfuzz[..]
+ && self.absflat[..] == other.absflat[..]
+ }
+ }
+ impl Eq for uinput_user_dev {}
+
+ impl ::fmt::Debug for uinput_user_dev {
+ fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
+ f.debug_struct("uinput_setup")
+ .field("name", &&self.name[..])
+ .field("id", &self.id)
+ .field("ff_effects_max", &self.ff_effects_max)
+ .field("absmax", &&self.absmax[..])
+ .field("absmin", &&self.absmin[..])
+ .field("absfuzz", &&self.absfuzz[..])
+ .field("absflat", &&self.absflat[..])
+ .finish()
+ }
+ }
+
+ impl ::hash::Hash for uinput_user_dev {
+ fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
+ self.name.hash(state);
+ self.id.hash(state);
+ self.ff_effects_max.hash(state);
+ self.absmax.hash(state);
+ self.absmin.hash(state);
+ self.absfuzz.hash(state);
+ self.absflat.hash(state);
+ }
+ }
+
#[allow(deprecated)]
impl af_alg_iv {
fn as_slice(&self) -> &[u8] {
@@ -2173,6 +2389,38 @@ pub const NFT_TRACETYPE_RULE: ::c_int = 3;
pub const NFT_NG_INCREMENTAL: ::c_int = 0;
pub const NFT_NG_RANDOM: ::c_int = 1;
+// linux/input.h
+pub const FF_MAX: ::__u16 = 0x7f;
+pub const FF_CNT: usize = FF_MAX as usize + 1;
+
+// linux/input-event-codes.h
+pub const INPUT_PROP_MAX: ::__u16 = 0x1f;
+pub const INPUT_PROP_CNT: usize = INPUT_PROP_MAX as usize + 1;
+pub const EV_MAX: ::__u16 = 0x1f;
+pub const EV_CNT: usize = EV_MAX as usize + 1;
+pub const SYN_MAX: ::__u16 = 0xf;
+pub const SYN_CNT: usize = SYN_MAX as usize + 1;
+pub const KEY_MAX: ::__u16 = 0x2ff;
+pub const KEY_CNT: usize = KEY_MAX as usize + 1;
+pub const REL_MAX: ::__u16 = 0x0f;
+pub const REL_CNT: usize = REL_MAX as usize + 1;
+pub const ABS_MAX: ::__u16 = 0x3f;
+pub const ABS_CNT: usize = ABS_MAX as usize + 1;
+pub const SW_MAX: ::__u16 = 0x0f;
+pub const SW_CNT: usize = SW_MAX as usize + 1;
+pub const MSC_MAX: ::__u16 = 0x07;
+pub const MSC_CNT: usize = MSC_MAX as usize + 1;
+pub const LED_MAX: ::__u16 = 0x0f;
+pub const LED_CNT: usize = LED_MAX as usize + 1;
+pub const REP_MAX: ::__u16 = 0x01;
+pub const REP_CNT: usize = REP_MAX as usize + 1;
+pub const SND_MAX: ::__u16 = 0x07;
+pub const SND_CNT: usize = SND_MAX as usize + 1;
+
+// linux/uinput.h
+pub const UINPUT_VERSION: ::c_uint = 5;
+pub const UINPUT_MAX_NAME_SIZE: usize = 80;
+
pub const IFF_TUN: ::c_int = 0x0001;
pub const IFF_TAP: ::c_int = 0x0002;
pub const IFF_NO_PI: ::c_int = 0x1000;
@@ -3227,6 +3475,16 @@ extern "C" {
pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void;
pub fn pthread_getcpuclockid(thread: ::pthread_t, clk_id: *mut ::clockid_t) -> ::c_int;
+
+ pub fn dirname(path: *const ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *const ::c_char) -> *mut ::c_char;
+ pub fn getopt_long(
+ argc: ::c_int,
+ argv: *const *mut c_char,
+ optstring: *const c_char,
+ longopts: *const option,
+ longindex: *mut ::c_int,
+ ) -> ::c_int;
}
cfg_if! {
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 5265cdd17..40bc30a4f 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
@@ -106,7 +106,9 @@ cfg_if! {
}
cfg_if! {
- if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
+ if #[cfg(any(target_arch = "x86",
+ target_arch = "x86_64",
+ target_arch = "aarch64"))] {
pub const FICLONE: ::c_ulong = 0x40049409;
pub const FICLONERANGE: ::c_ulong = 0x4020940D;
}
diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b64/aarch64/align.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b64/aarch64/align.rs
index cb2df378c..06173be66 100644
--- a/vendor/libc/src/unix/linux_like/linux/gnu/b64/aarch64/align.rs
+++ b/vendor/libc/src/unix/linux_like/linux/gnu/b64/aarch64/align.rs
@@ -49,3 +49,10 @@ s! {
pub cgroup: ::c_ulonglong,
}
}
+
+extern "C" {
+ pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
+ pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
+ pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: ::c_int, ...);
+ pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int;
+}
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 b620cc03f..a20a1cf68 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
@@ -866,6 +866,7 @@ pub const SYS_pkey_alloc: ::c_long = 289;
pub const SYS_pkey_free: ::c_long = 290;
pub const SYS_statx: ::c_long = 291;
pub const SYS_rseq: ::c_long = 293;
+pub const SYS_kexec_file_load: ::c_long = 294;
pub const SYS_pidfd_send_signal: ::c_long = 424;
pub const SYS_io_uring_setup: ::c_long = 425;
pub const SYS_io_uring_enter: ::c_long = 426;
diff --git a/vendor/libc/src/unix/linux_like/linux/gnu/b64/loongarch64/align.rs b/vendor/libc/src/unix/linux_like/linux/gnu/b64/loongarch64/align.rs
index 7ca870fd0..4cae9c1c3 100644
--- a/vendor/libc/src/unix/linux_like/linux/gnu/b64/loongarch64/align.rs
+++ b/vendor/libc/src/unix/linux_like/linux/gnu/b64/loongarch64/align.rs
@@ -5,3 +5,36 @@ s_no_extra_traits! {
priv_: [f64; 4]
}
}
+
+s! {
+ pub struct ucontext_t {
+ pub uc_flags: ::c_ulong,
+ pub uc_link: *mut ucontext_t,
+ pub uc_stack: ::stack_t,
+ pub uc_sigmask: ::sigset_t,
+ pub uc_mcontext: mcontext_t,
+ }
+
+ #[repr(align(16))]
+ pub struct mcontext_t {
+ pub sc_pc: ::c_ulonglong,
+ pub sc_regs: [::c_ulonglong; 32],
+ pub sc_flags: ::c_ulong,
+ pub sc_extcontext: [u64; 0],
+ }
+
+ #[repr(align(8))]
+ pub struct clone_args {
+ pub flags: ::c_ulonglong,
+ pub pidfd: ::c_ulonglong,
+ pub child_tid: ::c_ulonglong,
+ pub parent_tid: ::c_ulonglong,
+ pub exit_signal: ::c_ulonglong,
+ pub stack: ::c_ulonglong,
+ pub stack_size: ::c_ulonglong,
+ pub tls: ::c_ulonglong,
+ pub set_tid: ::c_ulonglong,
+ pub set_tid_size: ::c_ulonglong,
+ pub cgroup: ::c_ulonglong,
+ }
+}
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 2ed6a9156..d64c353bb 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
@@ -325,8 +325,6 @@ pub const SYS_vmsplice: ::c_long = 75;
pub const SYS_splice: ::c_long = 76;
pub const SYS_tee: ::c_long = 77;
pub const SYS_readlinkat: ::c_long = 78;
-pub const SYS_newfstatat: ::c_long = 79;
-pub const SYS_fstat: ::c_long = 80;
pub const SYS_sync: ::c_long = 81;
pub const SYS_fsync: ::c_long = 82;
pub const SYS_fdatasync: ::c_long = 83;
@@ -409,8 +407,6 @@ pub const SYS_setgroups: ::c_long = 159;
pub const SYS_uname: ::c_long = 160;
pub const SYS_sethostname: ::c_long = 161;
pub const SYS_setdomainname: ::c_long = 162;
-pub const SYS_getrlimit: ::c_long = 163;
-pub const SYS_setrlimit: ::c_long = 164;
pub const SYS_getrusage: ::c_long = 165;
pub const SYS_umask: ::c_long = 166;
pub const SYS_prctl: ::c_long = 167;
@@ -772,8 +768,8 @@ pub const EXTPROC: ::tcflag_t = 0x00010000;
pub const TCSANOW: ::c_int = 0;
pub const TCSADRAIN: ::c_int = 1;
pub const TCSAFLUSH: ::c_int = 2;
-pub const SIGSTKSZ: ::size_t = 8192;
-pub const MINSIGSTKSZ: ::size_t = 2048;
+pub const SIGSTKSZ: ::size_t = 16384;
+pub const MINSIGSTKSZ: ::size_t = 4096;
pub const CBAUD: ::tcflag_t = 0o0010017;
pub const CSIZE: ::tcflag_t = 0x00000030;
pub const CS6: ::tcflag_t = 0x00000010;
@@ -858,17 +854,6 @@ pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
pub const EFD_CLOEXEC: ::c_int = 0x80000;
pub const EFD_NONBLOCK: ::c_int = 0x800;
-extern "C" {
- pub fn sysctl(
- name: *mut ::c_int,
- namelen: ::c_int,
- oldp: *mut ::c_void,
- oldlenp: *mut ::size_t,
- newp: *mut ::c_void,
- newlen: ::size_t,
- ) -> ::c_int;
-}
-
cfg_if! {
if #[cfg(libc_align)] {
mod align;
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 21e7619db..98a58a2ac 100644
--- a/vendor/libc/src/unix/linux_like/linux/gnu/mod.rs
+++ b/vendor/libc/src/unix/linux_like/linux/gnu/mod.rs
@@ -1335,6 +1335,25 @@ extern "C" {
pub fn euidaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int;
pub fn eaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int;
+
+ pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char;
+ pub fn ctime_r(timep: *const time_t, buf: *mut ::c_char) -> *mut ::c_char;
+
+ pub fn strftime(
+ s: *mut ::c_char,
+ max: ::size_t,
+ format: *const ::c_char,
+ tm: *const ::tm,
+ ) -> ::size_t;
+ pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char;
+
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ /// POSIX version of `basename(3)`, defined in `libgen.h`.
+ #[link_name = "__xpg_basename"]
+ pub fn posix_basename(path: *mut ::c_char) -> *mut ::c_char;
+ /// GNU version of `basename(3)`, defined in `string.h`.
+ #[link_name = "basename"]
+ pub fn gnu_basename(path: *const ::c_char) -> *mut ::c_char;
}
extern "C" {
diff --git a/vendor/libc/src/unix/linux_like/linux/mod.rs b/vendor/libc/src/unix/linux_like/linux/mod.rs
index 43f6399e4..f0a0820c3 100644
--- a/vendor/libc/src/unix/linux_like/linux/mod.rs
+++ b/vendor/libc/src/unix/linux_like/linux/mod.rs
@@ -603,6 +603,28 @@ s! {
pub src_length: ::__u64,
pub dest_offset: ::__u64,
}
+
+ pub struct __c_anonymous_ifru_map {
+ pub mem_start: ::c_ulong,
+ pub mem_end: ::c_ulong,
+ pub base_addr: ::c_ushort,
+ pub irq: ::c_uchar,
+ pub dma: ::c_uchar,
+ pub port: ::c_uchar,
+ }
+
+ pub struct in6_ifreq {
+ pub ifr6_addr: ::in6_addr,
+ pub ifr6_prefixlen: u32,
+ pub ifr6_ifindex: ::c_int,
+ }
+
+ pub struct option {
+ pub name: *const ::c_char,
+ pub has_arg: ::c_int,
+ pub flag: *mut ::c_int,
+ pub val: ::c_int,
+ }
}
s_no_extra_traits! {
@@ -690,6 +712,32 @@ s_no_extra_traits! {
#[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
pad: [::c_long; 4],
}
+
+ #[cfg(libc_union)]
+ pub union __c_anonymous_ifr_ifru {
+ pub ifru_addr: ::sockaddr,
+ pub ifru_dstaddr: ::sockaddr,
+ pub ifru_broadaddr: ::sockaddr,
+ pub ifru_netmask: ::sockaddr,
+ pub ifru_hwaddr: ::sockaddr,
+ pub ifru_flags: ::c_short,
+ pub ifru_ifindex: ::c_int,
+ pub ifru_metric: ::c_int,
+ pub ifru_mtu: ::c_int,
+ pub ifru_map: __c_anonymous_ifru_map,
+ pub ifru_slave: [::c_char; ::IFNAMSIZ],
+ pub ifru_newname: [::c_char; ::IFNAMSIZ],
+ pub ifru_data: *mut ::c_char,
+ }
+
+ pub struct ifreq {
+ /// interface name, e.g. "en0"
+ pub ifr_name: [::c_char; ::IFNAMSIZ],
+ #[cfg(libc_union)]
+ pub ifr_ifru: __c_anonymous_ifr_ifru,
+ #[cfg(not(libc_union))]
+ pub ifr_ifru: ::sockaddr,
+ }
}
s_no_extra_traits! {
@@ -1063,6 +1111,34 @@ cfg_if! {
self.mq_curmsgs.hash(state);
}
}
+ #[cfg(libc_union)]
+ impl ::fmt::Debug for __c_anonymous_ifr_ifru {
+ fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
+ f.debug_struct("ifr_ifru")
+ .field("ifru_addr", unsafe { &self.ifru_addr })
+ .field("ifru_dstaddr", unsafe { &self.ifru_dstaddr })
+ .field("ifru_broadaddr", unsafe { &self.ifru_broadaddr })
+ .field("ifru_netmask", unsafe { &self.ifru_netmask })
+ .field("ifru_hwaddr", unsafe { &self.ifru_hwaddr })
+ .field("ifru_flags", unsafe { &self.ifru_flags })
+ .field("ifru_ifindex", unsafe { &self.ifru_ifindex })
+ .field("ifru_metric", unsafe { &self.ifru_metric })
+ .field("ifru_mtu", unsafe { &self.ifru_mtu })
+ .field("ifru_map", unsafe { &self.ifru_map })
+ .field("ifru_slave", unsafe { &self.ifru_slave })
+ .field("ifru_newname", unsafe { &self.ifru_newname })
+ .field("ifru_data", unsafe { &self.ifru_data })
+ .finish()
+ }
+ }
+ impl ::fmt::Debug for ifreq {
+ fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
+ f.debug_struct("ifreq")
+ .field("ifr_name", &self.ifr_name)
+ .field("ifr_ifru", &self.ifr_ifru)
+ .finish()
+ }
+ }
}
}
@@ -1524,6 +1600,7 @@ pub const POSIX_MADV_RANDOM: ::c_int = 1;
pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
pub const POSIX_MADV_WILLNEED: ::c_int = 3;
pub const POSIX_SPAWN_USEVFORK: ::c_int = 64;
+pub const POSIX_SPAWN_SETSID: ::c_int = 128;
pub const S_IEXEC: mode_t = 64;
pub const S_IWRITE: mode_t = 128;
@@ -2552,6 +2629,24 @@ pub const SIOCGIFSLAVE: ::c_ulong = 0x00008929;
pub const SIOCSIFSLAVE: ::c_ulong = 0x00008930;
pub const SIOCADDMULTI: ::c_ulong = 0x00008931;
pub const SIOCDELMULTI: ::c_ulong = 0x00008932;
+pub const SIOCGIFINDEX: ::c_ulong = 0x00008933;
+pub const SIOGIFINDEX: ::c_ulong = SIOCGIFINDEX;
+pub const SIOCSIFPFLAGS: ::c_ulong = 0x00008934;
+pub const SIOCGIFPFLAGS: ::c_ulong = 0x00008935;
+pub const SIOCDIFADDR: ::c_ulong = 0x00008936;
+pub const SIOCSIFHWBROADCAST: ::c_ulong = 0x00008937;
+pub const SIOCGIFCOUNT: ::c_ulong = 0x00008938;
+pub const SIOCGIFBR: ::c_ulong = 0x00008940;
+pub const SIOCSIFBR: ::c_ulong = 0x00008941;
+pub const SIOCGIFTXQLEN: ::c_ulong = 0x00008942;
+pub const SIOCSIFTXQLEN: ::c_ulong = 0x00008943;
+pub const SIOCETHTOOL: ::c_ulong = 0x00008946;
+pub const SIOCGMIIPHY: ::c_ulong = 0x00008947;
+pub const SIOCGMIIREG: ::c_ulong = 0x00008948;
+pub const SIOCSMIIREG: ::c_ulong = 0x00008949;
+pub const SIOCWANDEV: ::c_ulong = 0x0000894A;
+pub const SIOCOUTQNSD: ::c_ulong = 0x0000894B;
+pub const SIOCGSKNS: ::c_ulong = 0x0000894C;
pub const SIOCDARP: ::c_ulong = 0x00008953;
pub const SIOCGARP: ::c_ulong = 0x00008954;
pub const SIOCSARP: ::c_ulong = 0x00008955;
@@ -3710,6 +3805,16 @@ extern "C" {
pub fn rand() -> ::c_int;
pub fn srand(seed: ::c_uint);
+ pub fn drand48() -> ::c_double;
+ pub fn erand48(xseed: *mut ::c_ushort) -> ::c_double;
+ pub fn lrand48() -> ::c_long;
+ pub fn nrand48(xseed: *mut ::c_ushort) -> ::c_long;
+ pub fn mrand48() -> ::c_long;
+ pub fn jrand48(xseed: *mut ::c_ushort) -> ::c_long;
+ pub fn srand48(seed: ::c_long);
+ pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort;
+ pub fn lcong48(p: *mut ::c_ushort);
+
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
pub fn setpwent();
@@ -4343,6 +4448,13 @@ extern "C" {
pub fn pthread_getname_np(thread: ::pthread_t, name: *mut ::c_char, len: ::size_t) -> ::c_int;
pub fn pthread_setname_np(thread: ::pthread_t, name: *const ::c_char) -> ::c_int;
+ pub fn getopt_long(
+ argc: ::c_int,
+ argv: *const *mut c_char,
+ optstring: *const c_char,
+ longopts: *const option,
+ longindex: *mut ::c_int,
+ ) -> ::c_int;
}
cfg_if! {
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 894f377ac..2a894a602 100644
--- a/vendor/libc/src/unix/linux_like/linux/musl/mod.rs
+++ b/vendor/libc/src/unix/linux_like/linux/musl/mod.rs
@@ -590,6 +590,8 @@ pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
pub const SFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
+pub const PIDFD_NONBLOCK: ::c_uint = O_NONBLOCK as ::c_uint;
+
pub const TCSANOW: ::c_int = 0;
pub const TCSADRAIN: ::c_int = 1;
pub const TCSAFLUSH: ::c_int = 2;
@@ -757,6 +759,19 @@ extern "C" {
pub fn euidaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int;
pub fn eaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int;
+
+ pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char;
+
+ pub fn strftime(
+ s: *mut ::c_char,
+ max: ::size_t,
+ format: *const ::c_char,
+ tm: *const ::tm,
+ ) -> ::size_t;
+ pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char;
+
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
cfg_if! {
diff --git a/vendor/libc/src/unix/linux_like/linux/uclibc/arm/mod.rs b/vendor/libc/src/unix/linux_like/linux/uclibc/arm/mod.rs
index a0035b277..25125bcc9 100644
--- a/vendor/libc/src/unix/linux_like/linux/uclibc/arm/mod.rs
+++ b/vendor/libc/src/unix/linux_like/linux/uclibc/arm/mod.rs
@@ -884,8 +884,10 @@ pub const SYS_pkey_mprotect: ::c_long = 394;
pub const SYS_pkey_alloc: ::c_long = 395;
pub const SYS_pkey_free: ::c_long = 396;
pub const SYS_statx: ::c_int = 397;
+pub const SYS_pidfd_send_signal: ::c_long = 424;
pub const SYS_pidfd_open: ::c_long = 434;
pub const SYS_clone3: ::c_long = 435;
+pub const SYS_pidfd_getfd: ::c_long = 438;
cfg_if! {
if #[cfg(libc_align)] {
diff --git a/vendor/libc/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs b/vendor/libc/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs
index e11dc6145..7f9d3c031 100644
--- a/vendor/libc/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs
+++ b/vendor/libc/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs
@@ -13,6 +13,7 @@ pub type nlink_t = u32;
pub type fsblkcnt_t = ::c_ulong;
pub type fsfilcnt_t = ::c_ulong;
pub type __u64 = ::c_ulonglong;
+pub type __s64 = ::c_longlong;
pub type fsblkcnt64_t = u64;
pub type fsfilcnt64_t = u64;
diff --git a/vendor/libc/src/unix/linux_like/mod.rs b/vendor/libc/src/unix/linux_like/mod.rs
index 46964cc17..8e738d87b 100644
--- a/vendor/libc/src/unix/linux_like/mod.rs
+++ b/vendor/libc/src/unix/linux_like/mod.rs
@@ -231,11 +231,11 @@ s_no_extra_traits! {
pub struct sockaddr_storage {
pub ss_family: sa_family_t,
- __ss_align: ::size_t,
#[cfg(target_pointer_width = "32")]
- __ss_pad2: [u8; 128 - 2 * 4],
+ __ss_pad2: [u8; 128 - 2 - 4],
#[cfg(target_pointer_width = "64")]
- __ss_pad2: [u8; 128 - 2 * 8],
+ __ss_pad2: [u8; 128 - 2 - 8],
+ __ss_align: ::size_t,
}
pub struct utsname {
diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
index ecc693e3d..fb9ebf792 100644
--- a/vendor/libc/src/unix/mod.rs
+++ b/vendor/libc/src/unix/mod.rs
@@ -329,6 +329,8 @@ cfg_if! {
cfg(target_feature = "crt-static"))]
#[link(name = "gcc", kind = "static", modifiers = "-bundle",
cfg(target_feature = "crt-static"))]
+ #[link(name = "c", kind = "static", modifiers = "-bundle",
+ cfg(target_feature = "crt-static"))]
#[link(name = "util", cfg(not(target_feature = "crt-static")))]
#[link(name = "rt", cfg(not(target_feature = "crt-static")))]
#[link(name = "pthread", cfg(not(target_feature = "crt-static")))]
@@ -356,6 +358,7 @@ cfg_if! {
extern {}
} else if #[cfg(any(target_os = "macos",
target_os = "ios",
+ target_os = "tvos",
target_os = "watchos",
target_os = "android",
target_os = "openbsd"))] {
@@ -1030,7 +1033,12 @@ extern "C" {
pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int;
#[cfg_attr(
- any(target_os = "macos", target_os = "ios", target_os = "watchos"),
+ any(
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "tvos",
+ target_os = "watchos"
+ ),
link_name = "realpath$DARWIN_EXTSN"
)]
pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char) -> *mut ::c_char;
@@ -1197,7 +1205,12 @@ extern "C" {
link_name = "__res_init"
)]
#[cfg_attr(
- any(target_os = "macos", target_os = "ios", target_os = "watchos"),
+ any(
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "tvos",
+ target_os = "watchos"
+ ),
link_name = "res_9_init"
)]
pub fn res_init() -> ::c_int;
@@ -1293,7 +1306,7 @@ extern "C" {
#[cfg_attr(target_os = "netbsd", link_name = "__select50")]
pub fn select(
nfds: ::c_int,
- readfs: *mut fd_set,
+ readfds: *mut fd_set,
writefds: *mut fd_set,
errorfds: *mut fd_set,
timeout: *mut timeval,
@@ -1345,7 +1358,7 @@ extern "C" {
#[cfg_attr(target_os = "netbsd", link_name = "__pselect50")]
pub fn pselect(
nfds: ::c_int,
- readfs: *mut fd_set,
+ readfds: *mut fd_set,
writefds: *mut fd_set,
errorfds: *mut fd_set,
timeout: *const timespec,
@@ -1483,6 +1496,7 @@ cfg_if! {
pub use self::linux_like::*;
} else if #[cfg(any(target_os = "macos",
target_os = "ios",
+ target_os = "tvos",
target_os = "watchos",
target_os = "freebsd",
target_os = "dragonfly",
diff --git a/vendor/libc/src/unix/redox/mod.rs b/vendor/libc/src/unix/redox/mod.rs
index bc46d4942..afba67727 100644
--- a/vendor/libc/src/unix/redox/mod.rs
+++ b/vendor/libc/src/unix/redox/mod.rs
@@ -1,8 +1,20 @@
pub type c_char = i8;
-pub type c_long = i64;
-pub type c_ulong = u64;
pub type wchar_t = i32;
+cfg_if! {
+ if #[cfg(target_pointer_width = "32")] {
+ pub type c_long = i32;
+ pub type c_ulong = u32;
+ }
+}
+
+cfg_if! {
+ if #[cfg(target_pointer_width = "64")] {
+ pub type c_long = i64;
+ pub type c_ulong = u64;
+ }
+}
+
pub type blkcnt_t = ::c_ulong;
pub type blksize_t = ::c_long;
pub type clock_t = ::c_long;
@@ -14,7 +26,7 @@ pub type ino_t = ::c_ulong;
pub type mode_t = ::c_int;
pub type nfds_t = ::c_ulong;
pub type nlink_t = ::c_ulong;
-pub type off_t = ::c_long;
+pub type off_t = ::c_longlong;
pub type pthread_t = *mut ::c_void;
pub type pthread_attr_t = *mut ::c_void;
pub type pthread_cond_t = *mut ::c_void;
@@ -34,7 +46,7 @@ pub type socklen_t = u32;
pub type speed_t = u32;
pub type suseconds_t = ::c_int;
pub type tcflag_t = u32;
-pub type time_t = ::c_long;
+pub type time_t = ::c_longlong;
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum timezone {}
@@ -375,6 +387,7 @@ pub const EPROTONOSUPPORT: ::c_int = 93; /* Protocol not supported */
pub const ESOCKTNOSUPPORT: ::c_int = 94; /* Socket type not supported */
/* Operation not supported on transport endpoint */
pub const EOPNOTSUPP: ::c_int = 95;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
pub const EPFNOSUPPORT: ::c_int = 96; /* Protocol family not supported */
/* Address family not supported by protocol */
pub const EAFNOSUPPORT: ::c_int = 97;
@@ -615,6 +628,7 @@ pub const EXIT_FAILURE: ::c_int = 1;
// sys/ioctl.h
// FIXME: relibc {
+pub const FIONREAD: ::c_ulong = 0x541B;
pub const FIONBIO: ::c_ulong = 0x5421;
pub const FIOCLEX: ::c_ulong = 0x5451;
// }
@@ -632,6 +646,12 @@ pub const PROT_READ: ::c_int = 0x0004;
pub const PROT_WRITE: ::c_int = 0x0002;
pub const PROT_EXEC: ::c_int = 0x0001;
+pub const MADV_NORMAL: ::c_int = 0;
+pub const MADV_RANDOM: ::c_int = 1;
+pub const MADV_SEQUENTIAL: ::c_int = 2;
+pub const MADV_WILLNEED: ::c_int = 3;
+pub const MADV_DONTNEED: ::c_int = 4;
+
pub const MAP_SHARED: ::c_int = 0x0001;
pub const MAP_PRIVATE: ::c_int = 0x0002;
pub const MAP_ANON: ::c_int = 0x0020;
@@ -661,6 +681,7 @@ pub const MSG_EOR: ::c_int = 128;
pub const MSG_OOB: ::c_int = 1;
pub const MSG_PEEK: ::c_int = 2;
pub const MSG_TRUNC: ::c_int = 32;
+pub const MSG_DONTWAIT: ::c_int = 64;
pub const MSG_WAITALL: ::c_int = 256;
pub const SHUT_RD: ::c_int = 0;
pub const SHUT_WR: ::c_int = 1;
@@ -1028,6 +1049,7 @@ extern "C" {
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
// sys/mman.h
+ pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int;
pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int;
pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int;
diff --git a/vendor/libc/src/unix/solarish/compat.rs b/vendor/libc/src/unix/solarish/compat.rs
index 4a232f0d8..cbf955a31 100644
--- a/vendor/libc/src/unix/solarish/compat.rs
+++ b/vendor/libc/src/unix/solarish/compat.rs
@@ -1,6 +1,7 @@
// Common functions that are unfortunately missing on illumos and
// Solaris, but often needed by other crates.
+use core::cmp::min;
use unix::solarish::*;
const PTEM: &[u8] = b"ptem\0";
@@ -169,3 +170,51 @@ pub unsafe fn forkpty(
0
}
+
+pub unsafe fn getpwent_r(
+ pwd: *mut passwd,
+ buf: *mut ::c_char,
+ buflen: ::size_t,
+ result: *mut *mut passwd,
+) -> ::c_int {
+ let old_errno = *::___errno();
+ *::___errno() = 0;
+ *result = native_getpwent_r(
+ pwd,
+ buf,
+ min(buflen, ::c_int::max_value() as ::size_t) as ::c_int,
+ );
+
+ let ret = if (*result).is_null() {
+ *::___errno()
+ } else {
+ 0
+ };
+ *::___errno() = old_errno;
+
+ ret
+}
+
+pub unsafe fn getgrent_r(
+ grp: *mut ::group,
+ buf: *mut ::c_char,
+ buflen: ::size_t,
+ result: *mut *mut ::group,
+) -> ::c_int {
+ let old_errno = *::___errno();
+ *::___errno() = 0;
+ *result = native_getgrent_r(
+ grp,
+ buf,
+ min(buflen, ::c_int::max_value() as ::size_t) as ::c_int,
+ );
+
+ let ret = if (*result).is_null() {
+ *::___errno()
+ } else {
+ 0
+ };
+ *::___errno() = old_errno;
+
+ ret
+}
diff --git a/vendor/libc/src/unix/solarish/illumos.rs b/vendor/libc/src/unix/solarish/illumos.rs
index 7d491d382..404f013da 100644
--- a/vendor/libc/src/unix/solarish/illumos.rs
+++ b/vendor/libc/src/unix/solarish/illumos.rs
@@ -56,8 +56,6 @@ pub const SOL_FILTER: ::c_int = 0xfffc;
pub const MADV_PURGE: ::c_int = 9;
-pub const MR_HDR_AOUT: ::c_uint = 0x3;
-
pub const B1000000: ::speed_t = 24;
pub const B1152000: ::speed_t = 25;
pub const B1500000: ::speed_t = 26;
diff --git a/vendor/libc/src/unix/solarish/mod.rs b/vendor/libc/src/unix/solarish/mod.rs
index c5da62be0..abe304e8e 100644
--- a/vendor/libc/src/unix/solarish/mod.rs
+++ b/vendor/libc/src/unix/solarish/mod.rs
@@ -466,6 +466,13 @@ s! {
pub pi_fputypes: [::c_char; PI_FPUTYPE as usize],
pub pi_clock: ::c_int,
}
+
+ pub struct option {
+ pub name: *const ::c_char,
+ pub has_arg: ::c_int,
+ pub flag: *mut ::c_int,
+ pub val: ::c_int,
+ }
}
s_no_extra_traits! {
@@ -3016,24 +3023,14 @@ extern "C" {
) -> ::c_int;
#[cfg_attr(
any(target_os = "solaris", target_os = "illumos"),
- link_name = "__posix_getpwent_r"
+ link_name = "getpwent_r"
)]
- pub fn getpwent_r(
- pwd: *mut passwd,
- buf: *mut ::c_char,
- buflen: ::size_t,
- result: *mut *mut passwd,
- ) -> ::c_int;
+ fn native_getpwent_r(pwd: *mut passwd, buf: *mut ::c_char, buflen: ::c_int) -> *mut passwd;
#[cfg_attr(
any(target_os = "solaris", target_os = "illumos"),
- link_name = "__posix_getgrent_r"
+ link_name = "getgrent_r"
)]
- pub fn getgrent_r(
- grp: *mut ::group,
- buf: *mut ::c_char,
- buflen: ::size_t,
- result: *mut *mut ::group,
- ) -> ::c_int;
+ fn native_getgrent_r(grp: *mut ::group, buf: *mut ::c_char, buflen: ::c_int) -> *mut ::group;
#[cfg_attr(
any(target_os = "solaris", target_os = "illumos"),
link_name = "__posix_sigwait"
@@ -3147,18 +3144,7 @@ extern "C" {
pub fn sysinfo(command: ::c_int, buf: *mut ::c_char, count: ::c_long) -> ::c_int;
pub fn faccessat(fd: ::c_int, path: *const ::c_char, amode: ::c_int, flag: ::c_int) -> ::c_int;
-}
-#[link(name = "sendfile")]
-extern "C" {
- pub fn sendfile(out_fd: ::c_int, in_fd: ::c_int, off: *mut ::off_t, len: ::size_t)
- -> ::ssize_t;
- pub fn sendfilev(
- fildes: ::c_int,
- vec: *const sendfilevec_t,
- sfvcnt: ::c_int,
- xferred: *mut ::size_t,
- ) -> ::ssize_t;
// #include <link.h>
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub fn dl_iterate_phdr(
@@ -3203,6 +3189,26 @@ extern "C" {
pub fn backtrace(buffer: *mut *mut ::c_void, size: ::c_int) -> ::c_int;
pub fn backtrace_symbols(buffer: *const *mut ::c_void, size: ::c_int) -> *mut *mut ::c_char;
pub fn backtrace_symbols_fd(buffer: *const *mut ::c_void, size: ::c_int, fd: ::c_int);
+
+ pub fn getopt_long(
+ argc: ::c_int,
+ argv: *const *mut c_char,
+ optstring: *const c_char,
+ longopts: *const option,
+ longindex: *mut ::c_int,
+ ) -> ::c_int;
+}
+
+#[link(name = "sendfile")]
+extern "C" {
+ pub fn sendfile(out_fd: ::c_int, in_fd: ::c_int, off: *mut ::off_t, len: ::size_t)
+ -> ::ssize_t;
+ pub fn sendfilev(
+ fildes: ::c_int,
+ vec: *const sendfilevec_t,
+ sfvcnt: ::c_int,
+ xferred: *mut ::size_t,
+ ) -> ::ssize_t;
}
#[link(name = "lgrp")]
diff --git a/vendor/libc/src/unix/solarish/solaris.rs b/vendor/libc/src/unix/solarish/solaris.rs
index 3fb166049..80bad281e 100644
--- a/vendor/libc/src/unix/solarish/solaris.rs
+++ b/vendor/libc/src/unix/solarish/solaris.rs
@@ -26,6 +26,30 @@ s! {
}
}
+s_no_extra_traits! {
+ #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
+ pub union door_desc_t__d_data {
+ pub d_desc: door_desc_t__d_data__d_desc,
+ d_resv: [::c_int; 5], /* Check out /usr/include/sys/door.h */
+ }
+
+ #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
+ pub struct door_desc_t {
+ pub d_attributes: door_attr_t,
+ pub d_data: door_desc_t__d_data,
+ }
+
+ #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
+ pub struct door_arg_t {
+ pub data_ptr: *const ::c_char,
+ pub data_size: ::size_t,
+ pub desc_ptr: *const door_desc_t,
+ pub dec_num: ::c_uint,
+ pub rbuf: *const ::c_char,
+ pub rsize: ::size_t,
+ }
+}
+
pub const PORT_SOURCE_POSTWAIT: ::c_int = 8;
pub const PORT_SOURCE_SIGNAL: ::c_int = 9;
@@ -75,27 +99,3 @@ extern "C" {
pub fn euidaccess(path: *const ::c_char, amode: ::c_int) -> ::c_int;
}
-
-s_no_extra_traits! {
- #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
- pub union door_desc_t__d_data {
- pub d_desc: door_desc_t__d_data__d_desc,
- d_resv: [::c_int; 5], /* Check out /usr/include/sys/door.h */
- }
-
- #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
- pub struct door_desc_t {
- pub d_attributes: door_attr_t,
- pub d_data: door_desc_t__d_data,
- }
-
- #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
- pub struct door_arg_t {
- pub data_ptr: *const ::c_char,
- pub data_size: ::size_t,
- pub desc_ptr: *const door_desc_t,
- pub dec_num: ::c_uint,
- pub rbuf: *const ::c_char,
- pub rsize: ::size_t,
- }
-}