summaryrefslogtreecommitdiffstats
path: root/vendor/libc/src/unix/linux_like/linux
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/libc/src/unix/linux_like/linux
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/libc/src/unix/linux_like/linux')
-rw-r--r--vendor/libc/src/unix/linux_like/linux/align.rs11
-rw-r--r--vendor/libc/src/unix/linux_like/linux/gnu/b64/loongarch64/align.rs8
-rw-r--r--vendor/libc/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs23
-rw-r--r--vendor/libc/src/unix/linux_like/linux/gnu/mod.rs3
-rw-r--r--vendor/libc/src/unix/linux_like/linux/mod.rs98
-rw-r--r--vendor/libc/src/unix/linux_like/linux/musl/b32/powerpc.rs3
-rw-r--r--vendor/libc/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs16
-rw-r--r--vendor/libc/src/unix/linux_like/linux/musl/b32/x86/mod.rs3
-rw-r--r--vendor/libc/src/unix/linux_like/linux/musl/b64/powerpc64.rs3
-rw-r--r--vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs16
-rw-r--r--vendor/libc/src/unix/linux_like/linux/musl/b64/s390x.rs28
-rw-r--r--vendor/libc/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs3
-rw-r--r--vendor/libc/src/unix/linux_like/linux/musl/lfs64.rs241
-rw-r--r--vendor/libc/src/unix/linux_like/linux/musl/mod.rs23
14 files changed, 387 insertions, 92 deletions
diff --git a/vendor/libc/src/unix/linux_like/linux/align.rs b/vendor/libc/src/unix/linux_like/linux/align.rs
index cd4bbc721..97f811dac 100644
--- a/vendor/libc/src/unix/linux_like/linux/align.rs
+++ b/vendor/libc/src/unix/linux_like/linux/align.rs
@@ -176,6 +176,17 @@ macro_rules! expand_align {
__res1: u8,
pub data: [u8; CANFD_MAX_DLEN],
}
+
+ #[repr(align(8))]
+ #[allow(missing_debug_implementations)]
+ pub struct canxl_frame {
+ pub prio: canid_t,
+ pub flags: u8,
+ pub sdt: u8,
+ pub len: u16,
+ pub af: u32,
+ pub data: [u8; CANXL_MAX_DLEN],
+ }
}
};
}
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 4cae9c1c3..dc191f51f 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
@@ -17,10 +17,10 @@ s! {
#[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],
+ pub __pc: ::c_ulonglong,
+ pub __gregs: [::c_ulonglong; 32],
+ pub __flags: ::c_uint,
+ pub __extcontext: [::c_ulonglong; 0],
}
#[repr(align(8))]
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 af2825b60..ea59181bc 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
@@ -189,6 +189,21 @@ s! {
__unused4: ::c_ulong,
__unused5: ::c_ulong
}
+
+ pub struct user_regs_struct {
+ pub regs: [u64; 32],
+ pub orig_a0: u64,
+ pub csr_era: u64,
+ pub csr_badv: u64,
+ pub reserved: [u64; 10],
+
+ }
+
+ pub struct user_fp_struct {
+ pub fpr: [u64; 32],
+ pub fcc: u64,
+ pub fcsr: u32,
+ }
}
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
@@ -549,7 +564,7 @@ pub const SYS_landlock_add_rule: ::c_long = 445;
pub const SYS_landlock_restrict_self: ::c_long = 446;
pub const SYS_process_mrelease: ::c_long = 448;
pub const SYS_futex_waitv: ::c_long = 449;
-//pub const SYS_set_mempolicy_home_node: ::c_long = 450;
+pub const SYS_set_mempolicy_home_node: ::c_long = 450;
pub const POSIX_FADV_DONTNEED: ::c_int = 4;
pub const POSIX_FADV_NOREUSE: ::c_int = 5;
@@ -684,6 +699,8 @@ pub const ENOTRECOVERABLE: ::c_int = 131;
pub const ERFKILL: ::c_int = 132;
pub const EHWPOISON: ::c_int = 133;
+pub const MADV_SOFT_OFFLINE: ::c_int = 101;
+
pub const MAP_NORESERVE: ::c_int = 0x4000;
pub const MAP_ANONYMOUS: ::c_int = 0x0020;
pub const MAP_ANON: ::c_int = 0x0020;
@@ -695,6 +712,7 @@ pub const MAP_POPULATE: ::c_int = 0x8000;
pub const MAP_NONBLOCK: ::c_int = 0x10000;
pub const MAP_STACK: ::c_int = 0x20000;
pub const MAP_HUGETLB: ::c_int = 0x40000;
+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;
@@ -746,6 +764,8 @@ pub const PTRACE_GETFPXREGS: ::c_uint = 18;
pub const PTRACE_SETFPXREGS: ::c_uint = 19;
pub const PTRACE_GETREGS: ::c_uint = 12;
pub const PTRACE_SETREGS: ::c_uint = 13;
+pub const PTRACE_SYSEMU: ::c_uint = 31;
+pub const PTRACE_SYSEMU_SINGLESTEP: ::c_uint = 32;
pub const RTLD_DEEPBIND: ::c_int = 0x8;
pub const RTLD_GLOBAL: ::c_int = 0x100;
@@ -846,6 +866,7 @@ pub const ECHOPRT: ::tcflag_t = 0x00000400;
pub const ECHOCTL: ::tcflag_t = 0x00000200;
pub const ISIG: ::tcflag_t = 0x00000001;
pub const ICANON: ::tcflag_t = 0x00000002;
+pub const XCASE: ::tcflag_t = 0x00000004;
pub const PENDIN: ::tcflag_t = 0x00004000;
pub const NOFLSH: ::tcflag_t = 0x00000080;
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 e88ad4eb2..ba4664bf5 100644
--- a/vendor/libc/src/unix/linux_like/linux/gnu/mod.rs
+++ b/vendor/libc/src/unix/linux_like/linux/gnu/mod.rs
@@ -1302,6 +1302,9 @@ extern "C" {
result: *mut *mut ::group,
) -> ::c_int;
+ pub fn putpwent(p: *const ::passwd, stream: *mut ::FILE) -> ::c_int;
+ pub fn putgrent(grp: *const ::group, stream: *mut ::FILE) -> ::c_int;
+
pub fn sethostid(hostid: ::c_long) -> ::c_int;
pub fn memfd_create(name: *const ::c_char, flags: ::c_uint) -> ::c_int;
diff --git a/vendor/libc/src/unix/linux_like/linux/mod.rs b/vendor/libc/src/unix/linux_like/linux/mod.rs
index 45a383b40..e52b3d3a8 100644
--- a/vendor/libc/src/unix/linux_like/linux/mod.rs
+++ b/vendor/libc/src/unix/linux_like/linux/mod.rs
@@ -61,11 +61,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,
@@ -685,6 +680,11 @@ s! {
pub struct sctp_authinfo {
pub auth_keynumber: ::__u16,
}
+
+ pub struct rlimit64 {
+ pub rlim_cur: rlim64_t,
+ pub rlim_max: rlim64_t,
+ }
}
s_no_extra_traits! {
@@ -703,14 +703,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 sockaddr_alg {
pub salg_family: ::sa_family_t,
pub salg_type: [::c_uchar; 14],
@@ -804,6 +796,14 @@ s_no_extra_traits! {
pub tx_type: ::c_int,
pub rx_filter: ::c_int,
}
+
+ 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],
+ }
}
s_no_extra_traits! {
@@ -3723,9 +3723,11 @@ pub const CAN_ERR_FLAG: canid_t = 0x20000000;
pub const CAN_SFF_MASK: canid_t = 0x000007FF;
pub const CAN_EFF_MASK: canid_t = 0x1FFFFFFF;
pub const CAN_ERR_MASK: canid_t = 0x1FFFFFFF;
+pub const CANXL_PRIO_MASK: ::canid_t = CAN_SFF_MASK;
pub const CAN_SFF_ID_BITS: ::c_int = 11;
pub const CAN_EFF_ID_BITS: ::c_int = 29;
+pub const CANXL_PRIO_BITS: ::c_int = CAN_SFF_ID_BITS;
pub const CAN_MAX_DLC: ::c_int = 8;
pub const CAN_MAX_DLEN: usize = 8;
@@ -3735,10 +3737,26 @@ pub const CANFD_MAX_DLEN: usize = 64;
pub const CANFD_BRS: ::c_int = 0x01;
pub const CANFD_ESI: ::c_int = 0x02;
+pub const CANXL_MIN_DLC: ::c_int = 0;
+pub const CANXL_MAX_DLC: ::c_int = 2047;
+pub const CANXL_MAX_DLC_MASK: ::c_int = 0x07FF;
+pub const CANXL_MIN_DLEN: usize = 1;
+pub const CANXL_MAX_DLEN: usize = 2048;
+
+pub const CANXL_XLF: ::c_int = 0x80;
+pub const CANXL_SEC: ::c_int = 0x01;
+
cfg_if! {
if #[cfg(libc_align)] {
pub const CAN_MTU: usize = ::mem::size_of::<can_frame>();
pub const CANFD_MTU: usize = ::mem::size_of::<canfd_frame>();
+ pub const CANXL_MTU: usize = ::mem::size_of::<canxl_frame>();
+ // FIXME: use `core::mem::offset_of!` once that is available
+ // https://github.com/rust-lang/rfcs/pull/3308
+ // pub const CANXL_HDR_SIZE: usize = core::mem::offset_of!(canxl_frame, data);
+ pub const CANXL_HDR_SIZE: usize = 12;
+ pub const CANXL_MIN_MTU: usize = CANXL_HDR_SIZE + 64;
+ pub const CANXL_MAX_MTU: usize = CANXL_MTU;
}
}
@@ -3764,6 +3782,7 @@ pub const CAN_RAW_LOOPBACK: ::c_int = 3;
pub const CAN_RAW_RECV_OWN_MSGS: ::c_int = 4;
pub const CAN_RAW_FD_FRAMES: ::c_int = 5;
pub const CAN_RAW_JOIN_FILTERS: ::c_int = 6;
+pub const CAN_RAW_XL_FRAMES: ::c_int = 7;
// linux/can/j1939.h
pub const SOL_CAN_J1939: ::c_int = SOL_CAN_BASE + CAN_J1939;
@@ -4280,21 +4299,8 @@ 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 fallocate(fd: ::c_int, mode: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int;
- pub fn fallocate64(fd: ::c_int, mode: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int;
pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int;
- pub fn posix_fallocate64(fd: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int;
pub fn readahead(fd: ::c_int, offset: ::off64_t, count: ::size_t) -> ::ssize_t;
pub fn getxattr(
path: *const c_char,
@@ -4595,12 +4601,6 @@ extern "C" {
offset: *mut off_t,
count: ::size_t,
) -> ::ssize_t;
- pub fn sendfile64(
- out_fd: ::c_int,
- in_fd: ::c_int,
- offset: *mut off64_t,
- count: ::size_t,
- ) -> ::ssize_t;
pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
pub fn getgrgid_r(
gid: ::gid_t,
@@ -4852,6 +4852,40 @@ extern "C" {
) -> ::ssize_t;
}
+// LFS64 extensions
+//
+// * musl has 64-bit versions only so aliases the LFS64 symbols to the standard ones
+cfg_if! {
+ if #[cfg(not(target_env = "musl"))] {
+ extern "C" {
+ pub fn fallocate64(
+ fd: ::c_int,
+ mode: ::c_int,
+ offset: ::off64_t,
+ len: ::off64_t
+ ) -> ::c_int;
+ pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::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 fseeko64(stream: *mut ::FILE, offset: ::off64_t, whence: ::c_int) -> ::c_int;
+ pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
+ pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
+ pub fn posix_fallocate64(fd: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int;
+ pub fn sendfile64(
+ out_fd: ::c_int,
+ in_fd: ::c_int,
+ offset: *mut off64_t,
+ count: ::size_t,
+ ) -> ::ssize_t;
+ pub fn tmpfile64() -> *mut ::FILE;
+ }
+ }
+}
+
cfg_if! {
if #[cfg(target_env = "uclibc")] {
mod uclibc;
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 3b998329b..b1669ade7 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
@@ -257,6 +257,9 @@ pub const MAP_STACK: ::c_int = 0x020000;
pub const MAP_HUGETLB: ::c_int = 0x040000;
pub const MAP_SYNC: ::c_int = 0x080000;
+pub const PTRACE_SYSEMU: ::c_int = 0x1d;
+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;
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 9ce6a9fd3..bf7a4f59c 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
@@ -184,22 +184,6 @@ s! {
__pad1: ::c_ulong,
__pad2: ::c_ulong,
}
-
- pub struct flock {
- pub l_type: ::c_short,
- pub l_whence: ::c_short,
- pub l_start: ::off_t,
- pub l_len: ::off_t,
- 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 const RLIM_INFINITY: ::rlim_t = !0;
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 c319b91b6..aaca917fa 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
@@ -456,6 +456,9 @@ pub const FLUSHO: ::tcflag_t = 0x00001000;
pub const POLLWRNORM: ::c_short = 0x100;
pub const POLLWRBAND: ::c_short = 0x200;
+pub const PTRACE_SYSEMU: ::c_int = 31;
+pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 32;
+
// Syscall table
pub const SYS_restart_syscall: ::c_long = 0;
pub const SYS_exit: ::c_long = 1;
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 0bb4cf837..c9bd94135 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
@@ -173,6 +173,9 @@ pub const MAP_STACK: ::c_int = 0x020000;
pub const MAP_HUGETLB: ::c_int = 0x040000;
pub const MAP_SYNC: ::c_int = 0x080000;
+pub const PTRACE_SYSEMU: ::c_int = 0x1d;
+pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 0x1e;
+
pub const SOCK_STREAM: ::c_int = 1;
pub const SOCK_DGRAM: ::c_int = 2;
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 f354293e0..9e9dbf6c8 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
@@ -173,22 +173,6 @@ s! {
__unused5: ::c_ulong,
__unused6: ::c_ulong,
}
-
- pub struct flock {
- pub l_type: ::c_short,
- pub l_whence: ::c_short,
- pub l_start: ::off_t,
- pub l_len: ::off_t,
- 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 const SYS_read: ::c_long = 63;
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 d7dcce615..f338dcc54 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
@@ -60,33 +60,33 @@ s! {
}
pub struct statfs {
- pub f_type: ::c_ulong,
- pub f_bsize: ::c_ulong,
+ pub f_type: ::c_uint,
+ pub f_bsize: ::c_uint,
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 f_namelen: ::c_uint,
+ pub f_frsize: ::c_uint,
+ pub f_flags: ::c_uint,
+ pub f_spare: [::c_uint; 4],
}
pub struct statfs64 {
- pub f_type: ::c_ulong,
- pub f_bsize: ::c_ulong,
+ pub f_type: ::c_uint,
+ pub f_bsize: ::c_uint,
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 f_namelen: ::c_uint,
+ pub f_frsize: ::c_uint,
+ pub f_flags: ::c_uint,
+ pub f_spare: [::c_uint; 4],
}
}
@@ -145,6 +145,7 @@ pub const ETIMEDOUT: ::c_int = 110;
pub const O_APPEND: ::c_int = 1024;
pub const O_CREAT: ::c_int = 64;
pub const O_EXCL: ::c_int = 128;
+pub const O_LARGEFILE: ::c_int = 0x8000;
pub const O_NONBLOCK: ::c_int = 2048;
pub const SA_NOCLDWAIT: ::c_int = 2;
pub const SA_ONSTACK: ::c_int = 0x08000000;
@@ -179,6 +180,9 @@ pub const MAP_STACK: ::c_int = 0x020000;
pub const MAP_HUGETLB: ::c_int = 0x040000;
pub const MAP_SYNC: ::c_int = 0x080000;
+pub const PTRACE_SYSEMU: ::c_int = 31;
+pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 32;
+
pub const EDEADLOCK: ::c_int = 35;
pub const ENAMETOOLONG: ::c_int = 36;
pub const ENOLCK: ::c_int = 37;
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 8198dc2f3..9decf91bc 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
@@ -682,6 +682,9 @@ pub const O_RSYNC: ::c_int = 1052672;
pub const O_DSYNC: ::c_int = 4096;
pub const O_ASYNC: ::c_int = 0x2000;
+pub const PTRACE_SYSEMU: ::c_int = 31;
+pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 32;
+
pub const SIGSTKSZ: ::size_t = 8192;
pub const MINSIGSTKSZ: ::size_t = 2048;
diff --git a/vendor/libc/src/unix/linux_like/linux/musl/lfs64.rs b/vendor/libc/src/unix/linux_like/linux/musl/lfs64.rs
new file mode 100644
index 000000000..27c1d2583
--- /dev/null
+++ b/vendor/libc/src/unix/linux_like/linux/musl/lfs64.rs
@@ -0,0 +1,241 @@
+#[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 fallocate64(
+ fd: ::c_int,
+ mode: ::c_int,
+ offset: ::off64_t,
+ len: ::off64_t,
+) -> ::c_int {
+ ::fallocate(fd, mode, offset, len)
+}
+
+#[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 prlimit64(
+ pid: ::pid_t,
+ resource: ::c_int,
+ new_limit: *const ::rlimit64,
+ old_limit: *mut ::rlimit64,
+) -> ::c_int {
+ ::prlimit(pid, resource, new_limit as *mut _, old_limit as *mut _)
+}
+
+#[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 sendfile64(
+ out_fd: ::c_int,
+ in_fd: ::c_int,
+ offset: *mut ::off64_t,
+ count: ::size_t,
+) -> ::ssize_t {
+ ::sendfile(out_fd, in_fd, offset, count)
+}
+
+#[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/linux/musl/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/mod.rs
index 37a8ca2af..4c6053389 100644
--- a/vendor/libc/src/unix/linux_like/linux/musl/mod.rs
+++ b/vendor/libc/src/unix/linux_like/linux/musl/mod.rs
@@ -22,8 +22,6 @@ pub type fsblkcnt_t = ::c_ulonglong;
pub type fsfilcnt_t = ::c_ulonglong;
pub type rlim_t = ::c_ulonglong;
-pub type flock64 = flock;
-
cfg_if! {
if #[cfg(doc)] {
// Used in `linux::arch` to define ioctl constants.
@@ -189,6 +187,14 @@ 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 regex_t {
__re_nsub: ::size_t,
__opaque: *mut ::c_void,
@@ -719,8 +725,6 @@ extern "C" {
timeout: *mut ::timespec,
) -> ::c_int;
- 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 prlimit(
@@ -729,13 +733,6 @@ extern "C" {
new_limit: *const ::rlimit,
old_limit: *mut ::rlimit,
) -> ::c_int;
- pub fn prlimit64(
- pid: ::pid_t,
- resource: ::c_int,
- new_limit: *const ::rlimit64,
- old_limit: *mut ::rlimit64,
- ) -> ::c_int;
-
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int;
pub fn ptrace(request: ::c_int, ...) -> ::c_long;
@@ -784,6 +781,10 @@ extern "C" {
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
+// Alias <foo> to <foo>64 to mimic glibc's LFS64 support
+mod lfs64;
+pub use self::lfs64::*;
+
cfg_if! {
if #[cfg(any(target_arch = "x86_64",
target_arch = "aarch64",