diff --git a/.cirrus.yml b/.cirrus.yml index 656696c825752..7985cb854bbe3 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,19 +3,22 @@ task: env: HOME: /tmp # cargo cache needs it TARGET: x86_64-unknown-freebsd + # FIXME(freebsd): FreeBSD has a segfault when `RUST_BACKTRACE` is set + # https://github.com/rust-lang/rust/issues/132185 + RUST_BACKTRACE: "0" matrix: - name: nightly freebsd-13 i686 # Test i686 FreeBSD in 32-bit emulation on a 64-bit host. env: TARGET: i686-unknown-freebsd freebsd_instance: - image_family: freebsd-13-3 + image_family: freebsd-13-4 - name: nightly freebsd-13 x86_64 freebsd_instance: - image_family: freebsd-13-3 + image_family: freebsd-13-4 - name: nightly freebsd-14 x86_64 freebsd_instance: - image: freebsd-14-1-release-amd64-ufs + image: freebsd-14-2-release-amd64-ufs - name: nightly freebsd-15 x86_64 freebsd_instance: image_family: freebsd-15-0-snap diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d255ebff1cf69..964d72d1d4d99 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -136,7 +136,9 @@ jobs: - i686-unknown-linux-musl - loongarch64-unknown-linux-gnu - loongarch64-unknown-linux-musl - - powerpc-unknown-linux-gnu + # FIXME(ppc): SIGILL running tests, see + # https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713 + # - powerpc-unknown-linux-gnu - powerpc64-unknown-linux-gnu - powerpc64le-unknown-linux-gnu - riscv64gc-unknown-linux-gnu diff --git a/libc-test/build.rs b/libc-test/build.rs index d023c466a3915..5c5fd96df21c0 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2140,6 +2140,9 @@ fn test_android(target: &str) { // Added in API level 26, but some tests use level 24. "endgrent" => true, + // Added in API level 26, but some tests use level 24. + "getdomainname" | "setdomainname" => true, + // FIXME: bad function pointers: "isalnum" | "isalpha" | "iscntrl" | "isdigit" | "isgraph" | "islower" | "isprint" | "ispunct" | "isspace" | "isupper" | "isxdigit" | "isblank" | "tolower" diff --git a/libc-test/semver/android.txt b/libc-test/semver/android.txt index 06a28efaac820..f8c136dd70e10 100644 --- a/libc-test/semver/android.txt +++ b/libc-test/semver/android.txt @@ -3324,6 +3324,7 @@ getaddrinfo getchar getchar_unlocked getcwd +getdomainname getegid getenv geteuid @@ -3720,6 +3721,7 @@ sendmsg sendto servent setbuf +setdomainname setegid setenv seteuid diff --git a/libc-test/semver/linux-musl.txt b/libc-test/semver/linux-musl.txt index 62b188dac8288..2223bb50059ee 100644 --- a/libc-test/semver/linux-musl.txt +++ b/libc-test/semver/linux-musl.txt @@ -5,6 +5,7 @@ AIO_ALLDONE AIO_CANCELED AIO_NOTCANCELED BOOT_TIME +CLONE_NEWTIME DEAD_PROCESS EMPTY Elf32_Chdr diff --git a/src/macros.rs b/src/macros.rs index b4db0fd469da8..e7dbf5611970e 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -243,7 +243,7 @@ cfg_if! { )*) => ($( #[inline] $(#[$attr])* - pub $($constness)* unsafe extern fn $i($($arg: $argty),*) -> $ret + pub $($constness)* unsafe extern "C" fn $i($($arg: $argty),*) -> $ret $body )*) } @@ -257,7 +257,7 @@ cfg_if! { )*) => ($( #[inline] $(#[$attr])* - pub $($constness)* extern fn $i($($arg: $argty),*) -> $ret + pub $($constness)* extern "C" fn $i($($arg: $argty),*) -> $ret $body )*) } @@ -285,7 +285,7 @@ cfg_if! { )*) => ($( #[inline] $(#[$attr])* - pub unsafe extern fn $i($($arg: $argty),*) -> $ret + pub unsafe extern "C" fn $i($($arg: $argty),*) -> $ret $body )*) } @@ -299,7 +299,7 @@ cfg_if! { )*) => ($( #[inline] $(#[$attr])* - pub extern fn $i($($arg: $argty),*) -> $ret + pub extern "C" fn $i($($arg: $argty),*) -> $ret $body )*) } diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs index 4a454619ef06c..9c81a8410db04 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs @@ -266,7 +266,8 @@ s! { pub st_blksize: crate::blksize_t, pub st_flags: crate::fflags_t, pub st_gen: u64, - pub st_spare: [u64; 10], + pub st_filerev: u64, + pub st_spare: [u64; 9], } } diff --git a/src/unix/hurd/mod.rs b/src/unix/hurd/mod.rs index 3a9253fc31f51..bb5339d0a48bd 100644 --- a/src/unix/hurd/mod.rs +++ b/src/unix/hurd/mod.rs @@ -226,7 +226,7 @@ pub type nl_item = c_int; pub type iconv_t = *mut c_void; #[cfg_attr(feature = "extra_traits", derive(Debug))] -pub enum fpos64_t {} // FIXME: fill this out with a struct +pub enum fpos64_t {} // FIXME(hurd): fill this out with a struct impl Copy for fpos64_t {} impl Clone for fpos64_t { fn clone(&self) -> fpos64_t { @@ -814,7 +814,7 @@ s! { pub ifa_flags: c_uint, pub ifa_addr: *mut crate::sockaddr, pub ifa_netmask: *mut crate::sockaddr, - pub ifa_ifu: *mut crate::sockaddr, // FIXME This should be a union + pub ifa_ifu: *mut crate::sockaddr, // FIXME(union) This should be a union pub ifa_data: *mut c_void, } @@ -1092,7 +1092,7 @@ cfg_if! { .field("ut_line", &self.ut_line) .field("ut_id", &self.ut_id) .field("ut_user", &self.ut_user) - // FIXME: .field("ut_host", &self.ut_host) + // FIXME(debug): .field("ut_host", &self.ut_host) .field("ut_exit", &self.ut_exit) .field("ut_session", &self.ut_session) .field("ut_tv", &self.ut_tv) diff --git a/src/unix/linux_like/android/b32/x86/mod.rs b/src/unix/linux_like/android/b32/x86/mod.rs index a5560e051660a..2acbe7712eb77 100644 --- a/src/unix/linux_like/android/b32/x86/mod.rs +++ b/src/unix/linux_like/android/b32/x86/mod.rs @@ -268,9 +268,11 @@ pub const SYS_modify_ldt: c_long = 123; pub const SYS_adjtimex: c_long = 124; pub const SYS_mprotect: c_long = 125; pub const SYS_sigprocmask: c_long = 126; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 127; pub const SYS_init_module: c_long = 128; pub const SYS_delete_module: c_long = 129; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 130; pub const SYS_quotactl: c_long = 131; pub const SYS_getpgid: c_long = 132; @@ -281,11 +283,11 @@ pub const SYS_personality: c_long = 136; pub const SYS_afs_syscall: c_long = 137; pub const SYS_setfsuid: c_long = 138; pub const SYS_setfsgid: c_long = 139; -// FIXME: SYS__llseek is in the NDK sources but for some reason is +// FIXME(android): SYS__llseek is in the NDK sources but for some reason is // not available in the tests // pub const SYS__llseek: c_long = 140; pub const SYS_getdents: c_long = 141; -// FIXME: SYS__newselect is in the NDK sources but for some reason is +// FIXME(android): SYS__newselect is in the NDK sources but for some reason is // not available in the tests // pub const SYS__newselect: c_long = 142; pub const SYS_flock: c_long = 143; @@ -294,7 +296,7 @@ pub const SYS_readv: c_long = 145; pub const SYS_writev: c_long = 146; pub const SYS_getsid: c_long = 147; pub const SYS_fdatasync: c_long = 148; -// FIXME: SYS__llseek is in the NDK sources but for some reason is +// FIXME(android): SYS__llseek is in the NDK sources but for some reason is // not available in the tests // pub const SYS__sysctl: c_long = 149; pub const SYS_mlock: c_long = 150; @@ -314,6 +316,7 @@ pub const SYS_mremap: c_long = 163; pub const SYS_setresuid: c_long = 164; pub const SYS_getresuid: c_long = 165; pub const SYS_vm86: c_long = 166; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 167; pub const SYS_poll: c_long = 168; pub const SYS_nfsservctl: c_long = 169; diff --git a/src/unix/linux_like/android/b64/mod.rs b/src/unix/linux_like/android/b64/mod.rs index ffa79ead870e8..0da702b45d18e 100644 --- a/src/unix/linux_like/android/b64/mod.rs +++ b/src/unix/linux_like/android/b64/mod.rs @@ -161,7 +161,7 @@ cfg_if! { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("pthread_mutex_t") .field("value", &self.value) - // FIXME: .field("__reserved", &self.__reserved) + // FIXME(debug): .field("__reserved", &self.__reserved) .finish() } } @@ -190,7 +190,7 @@ cfg_if! { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("pthread_cond_t") .field("value", &self.value) - // FIXME: .field("__reserved", &self.__reserved) + // FIXME(debug): .field("__reserved", &self.__reserved) .finish() } } @@ -227,7 +227,7 @@ cfg_if! { .field("pendingReaders", &self.pendingReaders) .field("pendingWriters", &self.pendingWriters) .field("attr", &self.attr) - // FIXME: .field("__reserved", &self.__reserved) + // FIXME(debug): .field("__reserved", &self.__reserved) .finish() } } diff --git a/src/unix/linux_like/android/b64/x86_64/mod.rs b/src/unix/linux_like/android/b64/x86_64/mod.rs index ad878462c8c1a..ce2d70999856a 100644 --- a/src/unix/linux_like/android/b64/x86_64/mod.rs +++ b/src/unix/linux_like/android/b64/x86_64/mod.rs @@ -353,7 +353,7 @@ cfg_if! { .field("mxcsr", &self.mxcsr) .field("mxcr_mask", &self.mxcr_mask) .field("st_space", &self.st_space) - // FIXME: .field("xmm_space", &self.xmm_space) + // FIXME(debug): .field("xmm_space", &self.xmm_space) // Ignore padding field .finish() } @@ -545,7 +545,7 @@ pub const SYS_munlockall: c_long = 152; pub const SYS_vhangup: c_long = 153; pub const SYS_modify_ldt: c_long = 154; pub const SYS_pivot_root: c_long = 155; -// FIXME: SYS__sysctl is in the NDK sources but for some reason is +// FIXME(android): SYS__sysctl is in the NDK sources but for some reason is // not available in the tests // pub const SYS__sysctl: c_long = 156; pub const SYS_prctl: c_long = 157; @@ -565,10 +565,13 @@ pub const SYS_sethostname: c_long = 170; pub const SYS_setdomainname: c_long = 171; pub const SYS_iopl: c_long = 172; pub const SYS_ioperm: c_long = 173; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 174; pub const SYS_init_module: c_long = 175; pub const SYS_delete_module: c_long = 176; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 177; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 178; pub const SYS_quotactl: c_long = 179; pub const SYS_nfsservctl: c_long = 180; diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index f408969175d34..b12120bb564d4 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -699,7 +699,7 @@ cfg_if! { .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) + // FIXME(debug): .field("d_name", &self.d_name) .finish() } } @@ -737,7 +737,7 @@ cfg_if! { .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) + // FIXME(debug): .field("d_name", &self.d_name) .finish() } } @@ -809,7 +809,7 @@ cfg_if! { f.debug_struct("lastlog") .field("ll_time", &self.ll_time) .field("ll_line", &self.ll_line) - // FIXME: .field("ll_host", &self.ll_host) + // FIXME(debug): .field("ll_host", &self.ll_host) .finish() } } @@ -860,7 +860,7 @@ cfg_if! { .field("ut_line", &self.ut_line) .field("ut_id", &self.ut_id) .field("ut_user", &self.ut_user) - // FIXME: .field("ut_host", &self.ut_host) + // FIXME(debug): .field("ut_host", &self.ut_host) .field("ut_exit", &self.ut_exit) .field("ut_session", &self.ut_session) .field("ut_tv", &self.ut_tv) diff --git a/src/unix/linux_like/emscripten/mod.rs b/src/unix/linux_like/emscripten/mod.rs index c51935ee99f96..94b3776606a41 100644 --- a/src/unix/linux_like/emscripten/mod.rs +++ b/src/unix/linux_like/emscripten/mod.rs @@ -44,7 +44,7 @@ pub type statvfs64 = crate::statvfs; pub type dirent64 = crate::dirent; #[cfg_attr(feature = "extra_traits", derive(Debug))] -pub enum fpos64_t {} // FIXME: fill this out with a struct +pub enum fpos64_t {} // FIXME(emscripten): fill this out with a struct impl Copy for fpos64_t {} impl Clone for fpos64_t { fn clone(&self) -> fpos64_t { @@ -412,7 +412,7 @@ cfg_if! { .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) + // FIXME(debug): .field("d_name", &self.d_name) .finish() } } @@ -465,7 +465,7 @@ cfg_if! { .field("totalhigh", &self.totalhigh) .field("freehigh", &self.freehigh) .field("mem_unit", &self.mem_unit) - // FIXME: .field("__reserved", &self.__reserved) + // FIXME(debug): .field("__reserved", &self.__reserved) .finish() } } @@ -525,7 +525,7 @@ cfg_if! { impl fmt::Debug for pthread_cond_t { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("pthread_cond_t") - // FIXME: .field("size", &self.size) + // FIXME(debug): .field("size", &self.size) .finish() } } @@ -1574,8 +1574,6 @@ extern "C" { pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int; pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char; - pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int; - pub fn setdomainname(name: *const c_char, len: size_t) -> c_int; pub fn sendmmsg( sockfd: c_int, msgvec: *mut crate::mmsghdr, diff --git a/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs b/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs index 2de54f047bbb4..d8b047ab446ab 100644 --- a/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs @@ -548,9 +548,11 @@ pub const SYS_cacheflush: c_long = 123; pub const SYS_adjtimex_time32: c_long = 124; pub const SYS_mprotect: c_long = 125; pub const SYS_sigprocmask: c_long = 126; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 127; pub const SYS_init_module: c_long = 128; pub const SYS_delete_module: c_long = 129; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 130; pub const SYS_quotactl: c_long = 131; pub const SYS_getpgid: c_long = 132; @@ -587,6 +589,7 @@ pub const SYS_mremap: c_long = 163; pub const SYS_setresuid16: c_long = 164; pub const SYS_getresuid16: c_long = 165; pub const SYS_getpagesize: c_long = 166; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 167; pub const SYS_poll: c_long = 168; pub const SYS_nfsservctl: c_long = 169; diff --git a/src/unix/linux_like/linux/gnu/b32/mips/mod.rs b/src/unix/linux_like/linux/gnu/b32/mips/mod.rs index 9fd8f819379e5..b15df99e50ec6 100644 --- a/src/unix/linux_like/linux/gnu/b32/mips/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/mips/mod.rs @@ -289,9 +289,11 @@ pub const SYS_modify_ldt: c_long = 4000 + 123; pub const SYS_adjtimex: c_long = 4000 + 124; pub const SYS_mprotect: c_long = 4000 + 125; pub const SYS_sigprocmask: c_long = 4000 + 126; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 4000 + 127; pub const SYS_init_module: c_long = 4000 + 128; pub const SYS_delete_module: c_long = 4000 + 129; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 4000 + 130; pub const SYS_quotactl: c_long = 4000 + 131; pub const SYS_getpgid: c_long = 4000 + 132; @@ -348,6 +350,7 @@ pub const SYS_socket: c_long = 4000 + 183; pub const SYS_socketpair: c_long = 4000 + 184; pub const SYS_setresuid: c_long = 4000 + 185; pub const SYS_getresuid: c_long = 4000 + 186; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 4000 + 187; pub const SYS_poll: c_long = 4000 + 188; pub const SYS_nfsservctl: c_long = 4000 + 189; diff --git a/src/unix/linux_like/linux/gnu/b32/powerpc.rs b/src/unix/linux_like/linux/gnu/b32/powerpc.rs index 025ae37002e35..d15012c4ec68c 100644 --- a/src/unix/linux_like/linux/gnu/b32/powerpc.rs +++ b/src/unix/linux_like/linux/gnu/b32/powerpc.rs @@ -555,9 +555,11 @@ pub const SYS_modify_ldt: c_long = 123; pub const SYS_adjtimex: c_long = 124; pub const SYS_mprotect: c_long = 125; pub const SYS_sigprocmask: c_long = 126; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 127; pub const SYS_init_module: c_long = 128; pub const SYS_delete_module: c_long = 129; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 130; pub const SYS_quotactl: c_long = 131; pub const SYS_getpgid: c_long = 132; @@ -594,6 +596,7 @@ pub const SYS_nanosleep: c_long = 162; pub const SYS_mremap: c_long = 163; pub const SYS_setresuid: c_long = 164; pub const SYS_getresuid: c_long = 165; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 166; pub const SYS_poll: c_long = 167; pub const SYS_nfsservctl: c_long = 168; diff --git a/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs b/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs index fcd3c52bcee37..de00e9915826a 100644 --- a/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs @@ -617,6 +617,7 @@ pub const SYS_flistxattr: c_long = 180; pub const SYS_removexattr: c_long = 181; pub const SYS_lremovexattr: c_long = 182; pub const SYS_sigpending: c_long = 183; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 184; pub const SYS_setpgid: c_long = 185; pub const SYS_fremovexattr: c_long = 186; @@ -654,8 +655,10 @@ pub const SYS_clone: c_long = 217; pub const SYS_ioprio_get: c_long = 218; pub const SYS_adjtimex: c_long = 219; pub const SYS_sigprocmask: c_long = 220; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 221; pub const SYS_delete_module: c_long = 222; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 223; pub const SYS_getpgid: c_long = 224; pub const SYS_bdflush: c_long = 225; diff --git a/src/unix/linux_like/linux/gnu/b32/x86/mod.rs b/src/unix/linux_like/linux/gnu/b32/x86/mod.rs index 84fb3ae31e6c9..bb2e3ccbf8925 100644 --- a/src/unix/linux_like/linux/gnu/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/x86/mod.rs @@ -771,9 +771,11 @@ pub const SYS_modify_ldt: c_long = 123; pub const SYS_adjtimex: c_long = 124; pub const SYS_mprotect: c_long = 125; pub const SYS_sigprocmask: c_long = 126; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 127; pub const SYS_init_module: c_long = 128; pub const SYS_delete_module: c_long = 129; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 130; pub const SYS_quotactl: c_long = 131; pub const SYS_getpgid: c_long = 132; @@ -811,6 +813,7 @@ pub const SYS_mremap: c_long = 163; pub const SYS_setresuid: c_long = 164; pub const SYS_getresuid: c_long = 165; pub const SYS_vm86: c_long = 166; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 167; pub const SYS_poll: c_long = 168; pub const SYS_nfsservctl: c_long = 169; diff --git a/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs b/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs index a4df172b8f5f7..0e990f6006378 100644 --- a/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs @@ -601,7 +601,7 @@ pub const HWCAP_SSBS: c_ulong = 1 << 28; pub const HWCAP_SB: c_ulong = 1 << 29; pub const HWCAP_PACA: c_ulong = 1 << 30; pub const HWCAP_PACG: c_ulong = 1 << 31; -// FIXME: enable these again once linux-api-headers are up to date enough on CI. +// FIXME(linux): enable these again once linux-api-headers are up to date enough on CI. // See discussion in https://github.com/rust-lang/libc/pull/1638 //pub const HWCAP2_DCPODP: c_ulong = 1 << 0; //pub const HWCAP2_SVE2: c_ulong = 1 << 1; diff --git a/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs b/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs index e1aef3759ddd5..1d13bdb945d6e 100644 --- a/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs @@ -411,10 +411,13 @@ pub const SYS_swapoff: c_long = 5000 + 163; pub const SYS_reboot: c_long = 5000 + 164; pub const SYS_sethostname: c_long = 5000 + 165; pub const SYS_setdomainname: c_long = 5000 + 166; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 5000 + 167; pub const SYS_init_module: c_long = 5000 + 168; pub const SYS_delete_module: c_long = 5000 + 169; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 5000 + 170; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 5000 + 171; pub const SYS_quotactl: c_long = 5000 + 172; pub const SYS_nfsservctl: c_long = 5000 + 173; diff --git a/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs b/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs index 8d79845eb401b..3eda86440d40c 100644 --- a/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs @@ -698,9 +698,11 @@ pub const SYS_modify_ldt: c_long = 123; pub const SYS_adjtimex: c_long = 124; pub const SYS_mprotect: c_long = 125; pub const SYS_sigprocmask: c_long = 126; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 127; pub const SYS_init_module: c_long = 128; pub const SYS_delete_module: c_long = 129; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 130; pub const SYS_quotactl: c_long = 131; pub const SYS_getpgid: c_long = 132; @@ -737,6 +739,7 @@ pub const SYS_nanosleep: c_long = 162; pub const SYS_mremap: c_long = 163; pub const SYS_setresuid: c_long = 164; pub const SYS_getresuid: c_long = 165; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 166; pub const SYS_poll: c_long = 167; pub const SYS_nfsservctl: c_long = 168; diff --git a/src/unix/linux_like/linux/gnu/b64/s390x.rs b/src/unix/linux_like/linux/gnu/b64/s390x.rs index d5ab89a86fc3c..7a48de58c967b 100644 --- a/src/unix/linux_like/linux/gnu/b64/s390x.rs +++ b/src/unix/linux_like/linux/gnu/b64/s390x.rs @@ -212,7 +212,7 @@ s! { } s_no_extra_traits! { - // FIXME: This is actually a union. + // FIXME(union): This is actually a union. pub struct fpreg_t { pub d: c_double, // f: c_float, @@ -679,9 +679,11 @@ pub const SYS_uname: c_long = 122; pub const SYS_adjtimex: c_long = 124; pub const SYS_mprotect: c_long = 125; pub const SYS_sigprocmask: c_long = 126; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 127; pub const SYS_init_module: c_long = 128; pub const SYS_delete_module: c_long = 129; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 130; pub const SYS_quotactl: c_long = 131; pub const SYS_getpgid: c_long = 132; @@ -712,6 +714,7 @@ pub const SYS_sched_get_priority_min: c_long = 160; pub const SYS_sched_rr_get_interval: c_long = 161; pub const SYS_nanosleep: c_long = 162; pub const SYS_mremap: c_long = 163; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 167; pub const SYS_poll: c_long = 168; pub const SYS_nfsservctl: c_long = 169; diff --git a/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs b/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs index b9f9485de1e37..829686ff16ee5 100644 --- a/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs @@ -710,6 +710,7 @@ pub const SYS_flistxattr: c_long = 180; pub const SYS_removexattr: c_long = 181; pub const SYS_lremovexattr: c_long = 182; pub const SYS_sigpending: c_long = 183; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 184; pub const SYS_setpgid: c_long = 185; pub const SYS_fremovexattr: c_long = 186; @@ -747,8 +748,10 @@ pub const SYS_clone: c_long = 217; pub const SYS_ioprio_get: c_long = 218; pub const SYS_adjtimex: c_long = 219; pub const SYS_sigprocmask: c_long = 220; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 221; pub const SYS_delete_module: c_long = 222; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 223; pub const SYS_getpgid: c_long = 224; pub const SYS_bdflush: c_long = 225; diff --git a/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs index a0dbb99ed76d9..291d78393fe9d 100644 --- a/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs @@ -308,7 +308,7 @@ s_no_extra_traits! { pub uc_mcontext: mcontext_t, pub uc_sigmask: crate::sigset_t, __private: [u8; 512], - // FIXME: the shadow stack field requires glibc >= 2.28. + // FIXME(linux): the shadow stack field requires glibc >= 2.28. // Re-add once we drop compatibility with glibc versions older than // 2.28. // @@ -357,7 +357,7 @@ cfg_if! { .field("mxcsr", &self.mxcsr) .field("mxcr_mask", &self.mxcr_mask) .field("st_space", &self.st_space) - // FIXME: .field("xmm_space", &self.xmm_space) + // FIXME(debug): .field("xmm_space", &self.xmm_space) // Ignore padding field .finish() } @@ -663,7 +663,7 @@ pub const PR_SPEC_FORCE_DISABLE: c_uint = 1 << 3; pub const PR_SPEC_DISABLE_NOEXEC: c_uint = 1 << 4; pub const PR_SPEC_STORE_BYPASS: c_int = 0; pub const PR_SPEC_INDIRECT_BRANCH: c_int = 1; -// FIXME: perharps for later +// FIXME(linux): perharps for later //pub const PR_SPEC_L1D_FLUSH: c_int = 2; pub const MCL_CURRENT: c_int = 0x0001; diff --git a/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs index 5e7d6e5da5523..eb9563e53e2c0 100644 --- a/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs +++ b/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs @@ -244,10 +244,13 @@ pub const SYS_sethostname: c_long = 170; pub const SYS_setdomainname: c_long = 171; pub const SYS_iopl: c_long = 172; pub const SYS_ioperm: c_long = 173; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 174; pub const SYS_init_module: c_long = 175; pub const SYS_delete_module: c_long = 176; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 177; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 178; pub const SYS_quotactl: c_long = 179; pub const SYS_nfsservctl: c_long = 180; diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs index 75ac2e088f7d9..48648e2b05a99 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -661,7 +661,7 @@ cfg_if! { .field("ut_line", &self.ut_line) .field("ut_id", &self.ut_id) .field("ut_user", &self.ut_user) - // FIXME: .field("ut_host", &self.ut_host) + // FIXME(debug): .field("ut_host", &self.ut_host) .field("ut_exit", &self.ut_exit) .field("ut_session", &self.ut_session) .field("ut_tv", &self.ut_tv) diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 7321d37a684c5..0439493375949 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -76,7 +76,7 @@ pub type sctp_assoc_t = __s32; pub type eventfd_t = u64; missing! { #[cfg_attr(feature = "extra_traits", derive(Debug))] - pub enum fpos64_t {} // FIXME: fill this out with a struct + pub enum fpos64_t {} // FIXME(linux): fill this out with a struct } e! { @@ -1751,7 +1751,7 @@ cfg_if! { .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) + // FIXME(debug): .field("d_name", &self.d_name) .finish() } } @@ -1789,7 +1789,7 @@ cfg_if! { .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) + // FIXME(debug): .field("d_name", &self.d_name) .finish() } } @@ -1815,7 +1815,7 @@ cfg_if! { impl fmt::Debug for pthread_cond_t { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("pthread_cond_t") - // FIXME: .field("size", &self.size) + // FIXME(debug): .field("size", &self.size) .finish() } } @@ -1837,7 +1837,7 @@ cfg_if! { impl fmt::Debug for pthread_mutex_t { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("pthread_mutex_t") - // FIXME: .field("size", &self.size) + // FIXME(debug): .field("size", &self.size) .finish() } } @@ -1859,7 +1859,7 @@ cfg_if! { impl fmt::Debug for pthread_rwlock_t { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("pthread_rwlock_t") - // FIXME: .field("size", &self.size) + // FIXME(debug): .field("size", &self.size) .finish() } } @@ -5256,6 +5256,7 @@ pub const CANFD_MAX_DLEN: usize = 64; pub const CANFD_BRS: c_int = 0x01; pub const CANFD_ESI: c_int = 0x02; +pub const CANFD_FDF: c_int = 0x04; pub const CANXL_MIN_DLC: c_int = 0; pub const CANXL_MAX_DLC: c_int = 2047; @@ -6341,8 +6342,6 @@ extern "C" { pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char; - pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int; - pub fn setdomainname(name: *const c_char, len: size_t) -> c_int; pub fn vhangup() -> c_int; pub fn sync(); pub fn syncfs(fd: c_int) -> c_int; diff --git a/src/unix/linux_like/linux/musl/b32/hexagon.rs b/src/unix/linux_like/linux/musl/b32/hexagon.rs index 61174fbd408da..f58eccca4edb3 100644 --- a/src/unix/linux_like/linux/musl/b32/hexagon.rs +++ b/src/unix/linux_like/linux/musl/b32/hexagon.rs @@ -233,7 +233,7 @@ pub const SIGVTALRM: c_int = 26; pub const SIGWINCH: c_int = 28; pub const SIGXCPU: c_int = 24; pub const SIGXFSZ: c_int = 25; -pub const SIG_SETMASK: c_int = 2; // FIXME check these +pub const SIG_SETMASK: c_int = 2; // FIXME(musl) check these pub const SIG_BLOCK: c_int = 0x000000; pub const SIG_UNBLOCK: c_int = 0x01; pub const SOCK_DGRAM: c_int = 2; @@ -286,7 +286,7 @@ pub const SYS_clock_settime: c_int = 112; pub const SYS_clone: c_int = 220; pub const SYS_close: c_int = 57; pub const SYS_connect: c_int = 203; -pub const SYS_copy_file_range: c_int = -1; // FIXME +pub const SYS_copy_file_range: c_int = -1; // FIXME(musl) pub const SYS_creat: c_int = 1064; pub const SYS_delete_module: c_int = 106; pub const SYS_dup2: c_int = 1041; diff --git a/src/unix/linux_like/linux/musl/b32/mips/mod.rs b/src/unix/linux_like/linux/musl/b32/mips/mod.rs index 56418ededd38e..c9aa5b136dcba 100644 --- a/src/unix/linux_like/linux/musl/b32/mips/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/mips/mod.rs @@ -502,9 +502,11 @@ pub const SYS_modify_ldt: c_long = 4000 + 123; pub const SYS_adjtimex: c_long = 4000 + 124; pub const SYS_mprotect: c_long = 4000 + 125; pub const SYS_sigprocmask: c_long = 4000 + 126; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 4000 + 127; pub const SYS_init_module: c_long = 4000 + 128; pub const SYS_delete_module: c_long = 4000 + 129; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 4000 + 130; pub const SYS_quotactl: c_long = 4000 + 131; pub const SYS_getpgid: c_long = 4000 + 132; @@ -560,6 +562,7 @@ pub const SYS_socket: c_long = 4000 + 183; pub const SYS_socketpair: c_long = 4000 + 184; pub const SYS_setresuid: c_long = 4000 + 185; pub const SYS_getresuid: c_long = 4000 + 186; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 4000 + 187; pub const SYS_poll: c_long = 4000 + 188; pub const SYS_nfsservctl: c_long = 4000 + 189; diff --git a/src/unix/linux_like/linux/musl/b32/powerpc.rs b/src/unix/linux_like/linux/musl/b32/powerpc.rs index de2c5d5e3f724..dbd10802e6656 100644 --- a/src/unix/linux_like/linux/musl/b32/powerpc.rs +++ b/src/unix/linux_like/linux/musl/b32/powerpc.rs @@ -468,9 +468,11 @@ pub const SYS_modify_ldt: c_long = 123; pub const SYS_adjtimex: c_long = 124; pub const SYS_mprotect: c_long = 125; pub const SYS_sigprocmask: c_long = 126; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 127; pub const SYS_init_module: c_long = 128; pub const SYS_delete_module: c_long = 129; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 130; pub const SYS_quotactl: c_long = 131; pub const SYS_getpgid: c_long = 132; @@ -507,6 +509,7 @@ pub const SYS_nanosleep: c_long = 162; pub const SYS_mremap: c_long = 163; pub const SYS_setresuid: c_long = 164; pub const SYS_getresuid: c_long = 165; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 166; pub const SYS_poll: c_long = 167; pub const SYS_nfsservctl: c_long = 168; diff --git a/src/unix/linux_like/linux/musl/b32/x86/mod.rs b/src/unix/linux_like/linux/musl/b32/x86/mod.rs index 5b947f38d99f2..52fe908802f32 100644 --- a/src/unix/linux_like/linux/musl/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/x86/mod.rs @@ -610,9 +610,11 @@ pub const SYS_modify_ldt: c_long = 123; pub const SYS_adjtimex: c_long = 124; pub const SYS_mprotect: c_long = 125; pub const SYS_sigprocmask: c_long = 126; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 127; pub const SYS_init_module: c_long = 128; pub const SYS_delete_module: c_long = 129; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 130; pub const SYS_quotactl: c_long = 131; pub const SYS_getpgid: c_long = 132; @@ -650,6 +652,7 @@ pub const SYS_mremap: c_long = 163; pub const SYS_setresuid: c_long = 164; pub const SYS_getresuid: c_long = 165; pub const SYS_vm86: c_long = 166; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 167; pub const SYS_poll: c_long = 168; pub const SYS_nfsservctl: c_long = 169; diff --git a/src/unix/linux_like/linux/musl/b64/mips64.rs b/src/unix/linux_like/linux/musl/b64/mips64.rs index 0ce7e932a2db4..33afe4e46c0d2 100644 --- a/src/unix/linux_like/linux/musl/b64/mips64.rs +++ b/src/unix/linux_like/linux/musl/b64/mips64.rs @@ -240,10 +240,13 @@ pub const SYS_swapoff: c_long = 5000 + 163; pub const SYS_reboot: c_long = 5000 + 164; pub const SYS_sethostname: c_long = 5000 + 165; pub const SYS_setdomainname: c_long = 5000 + 166; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 5000 + 167; pub const SYS_init_module: c_long = 5000 + 168; pub const SYS_delete_module: c_long = 5000 + 169; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 5000 + 170; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 5000 + 171; pub const SYS_quotactl: c_long = 5000 + 172; pub const SYS_nfsservctl: c_long = 5000 + 173; diff --git a/src/unix/linux_like/linux/musl/b64/powerpc64.rs b/src/unix/linux_like/linux/musl/b64/powerpc64.rs index f85e2748b1848..fb9653bc881a0 100644 --- a/src/unix/linux_like/linux/musl/b64/powerpc64.rs +++ b/src/unix/linux_like/linux/musl/b64/powerpc64.rs @@ -351,9 +351,11 @@ pub const SYS_modify_ldt: c_long = 123; pub const SYS_adjtimex: c_long = 124; pub const SYS_mprotect: c_long = 125; pub const SYS_sigprocmask: c_long = 126; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 127; pub const SYS_init_module: c_long = 128; pub const SYS_delete_module: c_long = 129; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 130; pub const SYS_quotactl: c_long = 131; pub const SYS_getpgid: c_long = 132; @@ -390,6 +392,7 @@ pub const SYS_nanosleep: c_long = 162; pub const SYS_mremap: c_long = 163; pub const SYS_setresuid: c_long = 164; pub const SYS_getresuid: c_long = 165; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 166; pub const SYS_poll: c_long = 167; pub const SYS_nfsservctl: c_long = 168; diff --git a/src/unix/linux_like/linux/musl/b64/s390x.rs b/src/unix/linux_like/linux/musl/b64/s390x.rs index 25f49fc15534d..b992a2c4361e4 100644 --- a/src/unix/linux_like/linux/musl/b64/s390x.rs +++ b/src/unix/linux_like/linux/musl/b64/s390x.rs @@ -63,7 +63,7 @@ s! { } s_no_extra_traits! { - // FIXME: This is actually a union. + // FIXME(union): This is actually a union. pub struct fpreg_t { pub d: c_double, // f: c_float, @@ -433,9 +433,11 @@ pub const SYS_uname: c_long = 122; pub const SYS_adjtimex: c_long = 124; pub const SYS_mprotect: c_long = 125; pub const SYS_sigprocmask: c_long = 126; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 127; pub const SYS_init_module: c_long = 128; pub const SYS_delete_module: c_long = 129; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 130; pub const SYS_quotactl: c_long = 131; pub const SYS_getpgid: c_long = 132; @@ -467,6 +469,7 @@ pub const SYS_sched_get_priority_min: c_long = 160; pub const SYS_sched_rr_get_interval: c_long = 161; pub const SYS_nanosleep: c_long = 162; pub const SYS_mremap: c_long = 163; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 167; pub const SYS_poll: c_long = 168; pub const SYS_nfsservctl: c_long = 169; diff --git a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs index b8f659b72392d..b44b54de65953 100644 --- a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs @@ -205,7 +205,7 @@ cfg_if! { .field("mxcsr", &self.mxcsr) .field("mxcr_mask", &self.mxcr_mask) .field("st_space", &self.st_space) - // FIXME: .field("xmm_space", &self.xmm_space) + // FIXME(debug): .field("xmm_space", &self.xmm_space) // Ignore padding field .finish() } @@ -445,10 +445,13 @@ pub const SYS_sethostname: c_long = 170; pub const SYS_setdomainname: c_long = 171; pub const SYS_iopl: c_long = 172; pub const SYS_ioperm: c_long = 173; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 174; pub const SYS_init_module: c_long = 175; pub const SYS_delete_module: c_long = 176; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 177; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 178; pub const SYS_quotactl: c_long = 179; pub const SYS_nfsservctl: c_long = 180; diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs index 4d31996d9c96e..81ee07483e7b4 100644 --- a/src/unix/linux_like/linux/musl/mod.rs +++ b/src/unix/linux_like/linux/musl/mod.rs @@ -516,7 +516,7 @@ s_no_extra_traits! { pub __reserved: [c_char; 256], } - // FIXME: musl added paddings and adjusted + // FIXME(musl): musl added paddings and adjusted // layout in 1.2.0 but our CI is still 1.1.24. // So, I'm leaving some fields as cfg for now. // ref. https://github.com/bminor/musl/commit/ @@ -608,7 +608,7 @@ cfg_if! { .field("totalhigh", &self.totalhigh) .field("freehigh", &self.freehigh) .field("mem_unit", &self.mem_unit) - // FIXME: .field("__reserved", &self.__reserved) + // FIXME(debug): .field("__reserved", &self.__reserved) .finish() } } @@ -665,7 +665,7 @@ cfg_if! { .field("ut_line", &self.ut_line) .field("ut_id", &self.ut_id) .field("ut_user", &self.ut_user) - //FIXME: .field("ut_host", &self.ut_host) + //FIXME(debug): .field("ut_host", &self.ut_host) .field("ut_exit", &self.ut_exit) .field("ut_session", &self.ut_session) //.field("__ut_pad2", &self.__ut_pad2) @@ -995,6 +995,8 @@ pub const XDP_PKT_CONTD: crate::__u32 = 1 << 0; pub const _CS_V6_ENV: c_int = 1148; pub const _CS_V7_ENV: c_int = 1149; +pub const CLONE_NEWTIME: c_int = 0x80; + cfg_if! { if #[cfg(target_arch = "s390x")] { pub const POSIX_FADV_DONTNEED: c_int = 6; diff --git a/src/unix/linux_like/linux/uclibc/arm/mod.rs b/src/unix/linux_like/linux/uclibc/arm/mod.rs index cbeedb51630f4..c237b7e160bbf 100644 --- a/src/unix/linux_like/linux/uclibc/arm/mod.rs +++ b/src/unix/linux_like/linux/uclibc/arm/mod.rs @@ -895,7 +895,7 @@ pub const SYS_pwritev2: c_long = 393; pub const SYS_pkey_mprotect: c_long = 394; pub const SYS_pkey_alloc: c_long = 395; pub const SYS_pkey_free: c_long = 396; -// FIXME: should be a `c_long` too, but a bug slipped in. +// FIXME(linux): should be a `c_long` too, but a bug slipped in. pub const SYS_statx: c_int = 397; pub const SYS_pidfd_send_signal: c_long = 424; pub const SYS_io_uring_setup: c_long = 425; diff --git a/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs b/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs index 049b987fcd98a..a78daea80b62c 100644 --- a/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs @@ -398,9 +398,11 @@ pub const SYS_modify_ldt: c_long = 4000 + 123; pub const SYS_adjtimex: c_long = 4000 + 124; pub const SYS_mprotect: c_long = 4000 + 125; pub const SYS_sigprocmask: c_long = 4000 + 126; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_create_module: c_long = 4000 + 127; pub const SYS_init_module: c_long = 4000 + 128; pub const SYS_delete_module: c_long = 4000 + 129; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_get_kernel_syms: c_long = 4000 + 130; pub const SYS_quotactl: c_long = 4000 + 131; pub const SYS_getpgid: c_long = 4000 + 132; @@ -457,6 +459,7 @@ pub const SYS_socket: c_long = 4000 + 183; pub const SYS_socketpair: c_long = 4000 + 184; pub const SYS_setresuid: c_long = 4000 + 185; pub const SYS_getresuid: c_long = 4000 + 186; +#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")] pub const SYS_query_module: c_long = 4000 + 187; pub const SYS_poll: c_long = 4000 + 188; pub const SYS_nfsservctl: c_long = 4000 + 189; diff --git a/src/unix/linux_like/linux/uclibc/x86_64/mod.rs b/src/unix/linux_like/linux/uclibc/x86_64/mod.rs index 8a363d558257f..016b6580c5754 100644 --- a/src/unix/linux_like/linux/uclibc/x86_64/mod.rs +++ b/src/unix/linux_like/linux/uclibc/x86_64/mod.rs @@ -154,14 +154,14 @@ s! { } pub struct stack_t { - // FIXME + // FIXME(ulibc) pub ss_sp: *mut c_void, pub ss_flags: c_int, pub ss_size: size_t, } pub struct statfs { - // FIXME + // FIXME(ulibc) pub f_type: fsword_t, pub f_bsize: fsword_t, pub f_blocks: crate::fsblkcnt_t, @@ -207,7 +207,7 @@ s! { } pub struct msghdr { - // FIXME + // FIXME(ulibc) pub msg_name: *mut c_void, pub msg_namelen: crate::socklen_t, pub msg_iov: *mut crate::iovec, @@ -218,7 +218,7 @@ s! { } pub struct termios { - // FIXME + // FIXME(ulibc) pub c_iflag: crate::tcflag_t, pub c_oflag: crate::tcflag_t, pub c_cflag: crate::tcflag_t, @@ -228,12 +228,12 @@ s! { } pub struct sigset_t { - // FIXME + // FIXME(ulibc) __val: [c_ulong; 16], } pub struct sysinfo { - // FIXME + // FIXME(ulibc) pub uptime: c_long, pub loads: [c_ulong; 3], pub totalram: c_ulong, @@ -251,7 +251,7 @@ s! { } pub struct glob_t { - // FIXME + // FIXME(ulibc) pub gl_pathc: size_t, pub gl_pathv: *mut *mut c_char, pub gl_offs: size_t, @@ -264,7 +264,7 @@ s! { } pub struct cpu_set_t { - // FIXME + // FIXME(ulibc) #[cfg(target_pointer_width = "32")] bits: [u32; 32], #[cfg(target_pointer_width = "64")] @@ -272,7 +272,7 @@ s! { } pub struct fsid_t { - // FIXME + // FIXME(ulibc) __val: [c_int; 2], } diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index ff8b63a9abaef..5b6325e8ca822 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -161,7 +161,7 @@ s! { pub ifa_flags: c_uint, pub ifa_addr: *mut crate::sockaddr, pub ifa_netmask: *mut crate::sockaddr, - pub ifa_ifu: *mut crate::sockaddr, // FIXME This should be a union + pub ifa_ifu: *mut crate::sockaddr, // FIXME(union) This should be a union pub ifa_data: *mut c_void, } @@ -342,7 +342,7 @@ cfg_if! { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("sockaddr_un") .field("sun_family", &self.sun_family) - // FIXME: .field("sun_path", &self.sun_path) + // FIXME(debug): .field("sun_path", &self.sun_path) .finish() } } @@ -371,7 +371,7 @@ cfg_if! { f.debug_struct("sockaddr_storage") .field("ss_family", &self.ss_family) .field("__ss_align", &self.__ss_align) - // FIXME: .field("__ss_pad2", &self.__ss_pad2) + // FIXME(debug): .field("__ss_pad2", &self.__ss_pad2) .finish() } } @@ -422,12 +422,12 @@ cfg_if! { impl fmt::Debug for utsname { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("utsname") - // FIXME: .field("sysname", &self.sysname) - // FIXME: .field("nodename", &self.nodename) - // FIXME: .field("release", &self.release) - // FIXME: .field("version", &self.version) - // FIXME: .field("machine", &self.machine) - // FIXME: .field("domainname", &self.domainname) + // FIXME(debug): .field("sysname", &self.sysname) + // FIXME(debug): .field("nodename", &self.nodename) + // FIXME(debug): .field("release", &self.release) + // FIXME(debug): .field("version", &self.version) + // FIXME(debug): .field("machine", &self.machine) + // FIXME(debug): .field("domainname", &self.domainname) .finish() } } @@ -1875,6 +1875,9 @@ extern "C" { pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int; pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int; + + pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int; + pub fn setdomainname(name: *const c_char, len: size_t) -> c_int; } // LFS64 extensions diff --git a/src/unix/mod.rs b/src/unix/mod.rs index a14dafdf06d9e..8a0aa3266759b 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -537,7 +537,7 @@ missing! { #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum FILE {} #[cfg_attr(feature = "extra_traits", derive(Debug))] - pub enum fpos_t {} // FIXME: fill this out with a struct + pub enum fpos_t {} // FIXME(unix): fill this out with a struct } extern "C" { @@ -1329,11 +1329,11 @@ extern "C" { #[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")] #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] - // FIXME: for `time_t` + // FIXME(time): for `time_t` pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; #[cfg_attr(target_os = "netbsd", link_name = "__localtime_r50")] #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] - // FIXME: for `time_t` + // FIXME(time): for `time_t` pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), @@ -1349,19 +1349,19 @@ extern "C" { pub fn time(time: *mut time_t) -> time_t; #[cfg_attr(target_os = "netbsd", link_name = "__gmtime50")] #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] - // FIXME: for `time_t` + // FIXME(time): for `time_t` pub fn gmtime(time_p: *const time_t) -> *mut tm; #[cfg_attr(target_os = "netbsd", link_name = "__locatime50")] #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] - // FIXME: for `time_t` + // FIXME(time): for `time_t` pub fn localtime(time_p: *const time_t) -> *mut tm; #[cfg_attr(target_os = "netbsd", link_name = "__difftime50")] #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] - // FIXME: for `time_t` + // FIXME(time): for `time_t` pub fn difftime(time1: time_t, time0: time_t) -> c_double; #[cfg_attr(target_os = "netbsd", link_name = "__timegm50")] #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] - // FIXME: for `time_t` + // FIXME(time): for `time_t` pub fn timegm(tm: *mut crate::tm) -> time_t; #[cfg_attr(target_os = "netbsd", link_name = "__mknod50")] @@ -1619,7 +1619,7 @@ cfg_if! { all(target_os = "freebsd", any(freebsd11, freebsd10)), link_name = "readdir_r@FBSD_1.0" )] - #[allow(non_autolinks)] // FIXME: `<>` breaks line length limit. + #[allow(non_autolinks)] // FIXME(docs): `<>` breaks line length limit. /// The 64-bit libc on Solaris and illumos only has readdir_r. If a /// 32-bit Solaris or illumos target is ever created, it should use /// __posix_readdir_r. See libc(3LIB) on Solaris or illumos: diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs index 7b918494c72c8..2f13157fff64a 100644 --- a/src/unix/redox/mod.rs +++ b/src/unix/redox/mod.rs @@ -348,7 +348,7 @@ pub const F_LOCK: c_int = 1; pub const F_TLOCK: c_int = 2; pub const F_TEST: c_int = 3; -// FIXME: relibc { +// FIXME(redox): relibc { pub const RTLD_DEFAULT: *mut c_void = 0i64 as *mut c_void; // } @@ -504,7 +504,7 @@ pub const F_GETFD: c_int = 1; pub const F_SETFD: c_int = 2; pub const F_GETFL: c_int = 3; pub const F_SETFL: c_int = 4; -// FIXME: relibc { +// FIXME(redox): relibc { pub const F_DUPFD_CLOEXEC: c_int = crate::F_DUPFD; // } pub const FD_CLOEXEC: c_int = 0x0100_0000; @@ -526,7 +526,7 @@ pub const O_DIRECTORY: c_int = 0x1000_0000; pub const O_PATH: c_int = 0x2000_0000; pub const O_SYMLINK: c_int = 0x4000_0000; // Negative to allow it to be used as int -// FIXME: Fix negative values missing from includes +// FIXME(redox): Fix negative values missing from includes pub const O_NOFOLLOW: c_int = -0x8000_0000; // locale.h @@ -567,7 +567,7 @@ pub const NI_NAMEREQD: c_int = 0x0008; pub const NI_DGRAM: c_int = 0x0010; // netinet/in.h -// FIXME: relibc { +// FIXME(redox): relibc { pub const IP_TTL: c_int = 2; pub const IPV6_UNICAST_HOPS: c_int = 16; pub const IPV6_MULTICAST_IF: c_int = 17; @@ -592,7 +592,7 @@ pub const IPPROTO_MAX: c_int = 255; // netinet/tcp.h pub const TCP_NODELAY: c_int = 1; -// FIXME: relibc { +// FIXME(redox): relibc { pub const TCP_KEEPIDLE: c_int = 1; // } @@ -723,7 +723,7 @@ pub const EXIT_SUCCESS: c_int = 0; pub const EXIT_FAILURE: c_int = 1; // sys/ioctl.h -// FIXME: relibc { +// FIXME(redox): relibc { pub const FIONREAD: c_ulong = 0x541B; pub const FIONBIO: c_ulong = 0x5421; pub const FIOCLEX: c_ulong = 0x5451; @@ -1283,7 +1283,7 @@ cfg_if! { .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) + // FIXME(debug): .field("d_name", &self.d_name) .finish() } } @@ -1315,7 +1315,7 @@ cfg_if! { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("sockaddr_un") .field("sun_family", &self.sun_family) - // FIXME: .field("sun_path", &self.sun_path) + // FIXME(debug): .field("sun_path", &self.sun_path) .finish() } } @@ -1346,7 +1346,7 @@ cfg_if! { f.debug_struct("sockaddr_storage") .field("ss_family", &self.ss_family) .field("__ss_align", &self.__ss_align) - // FIXME: .field("__ss_padding", &self.__ss_padding) + // FIXME(debug): .field("__ss_padding", &self.__ss_padding) .finish() } } @@ -1398,12 +1398,12 @@ cfg_if! { impl fmt::Debug for utsname { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("utsname") - // FIXME: .field("sysname", &self.sysname) - // FIXME: .field("nodename", &self.nodename) - // FIXME: .field("release", &self.release) - // FIXME: .field("version", &self.version) - // FIXME: .field("machine", &self.machine) - // FIXME: .field("domainname", &self.domainname) + // FIXME(debug): .field("sysname", &self.sysname) + // FIXME(debug): .field("nodename", &self.nodename) + // FIXME(debug): .field("release", &self.release) + // FIXME(debug): .field("version", &self.version) + // FIXME(debug): .field("machine", &self.machine) + // FIXME(debug): .field("domainname", &self.domainname) .finish() } } diff --git a/src/windows/mod.rs b/src/windows/mod.rs index 6e343db53f022..632c33f461493 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -272,7 +272,7 @@ impl Clone for FILE { } } #[cfg_attr(feature = "extra_traits", derive(Debug))] -pub enum fpos_t {} // FIXME: fill this out with a struct +pub enum fpos_t {} // FIXME(windows): fill this out with a struct impl Copy for fpos_t {} impl Clone for fpos_t { fn clone(&self) -> fpos_t { diff --git a/triagebot.toml b/triagebot.toml index 7a103b8fb72a6..d4ad3459c1fc8 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -177,3 +177,7 @@ cc = ["@semarie"] [mentions."src/unix/solarish"] message = "Some changes occurred in solarish module" cc = ["@jclulow", "@pfmooney"] + +[mentions."src/unix/linux_like/android"] +message = "Some changes occurred in the Android module" +cc = ["@maurer"]