diff --git a/ci/docker/aarch64-linux-android/Dockerfile b/ci/docker/aarch64-linux-android/Dockerfile index dfd63718a9d0d..16f6d7dfce4e8 100644 --- a/ci/docker/aarch64-linux-android/Dockerfile +++ b/ci/docker/aarch64-linux-android/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN dpkg --add-architecture i386 RUN apt-get update diff --git a/ci/docker/aarch64-unknown-linux-gnu/Dockerfile b/ci/docker/aarch64-unknown-linux-gnu/Dockerfile index 00569ddf22c9b..f228d93500d21 100644 --- a/ci/docker/aarch64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/aarch64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev ca-certificates \ diff --git a/ci/docker/aarch64-unknown-linux-musl/Dockerfile b/ci/docker/aarch64-unknown-linux-musl/Dockerfile index 053ed837b2e7c..99828a5b65a21 100644 --- a/ci/docker/aarch64-unknown-linux-musl/Dockerfile +++ b/ci/docker/aarch64-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc make libc6-dev git curl ca-certificates \ diff --git a/ci/docker/arm-linux-androideabi/Dockerfile b/ci/docker/arm-linux-androideabi/Dockerfile index 82f89f48e915c..f7c320547dc5a 100644 --- a/ci/docker/arm-linux-androideabi/Dockerfile +++ b/ci/docker/arm-linux-androideabi/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN dpkg --add-architecture i386 RUN apt-get update diff --git a/ci/docker/asmjs-unknown-emscripten/Dockerfile b/ci/docker/asmjs-unknown-emscripten/Dockerfile index 085e45ff35ee6..c96435e8d2af8 100644 --- a/ci/docker/asmjs-unknown-emscripten/Dockerfile +++ b/ci/docker/asmjs-unknown-emscripten/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 # This is a workaround to avoid the interaction with tzdata. ENV DEBIAN_FRONTEND=noninteractive diff --git a/ci/docker/i686-linux-android/Dockerfile b/ci/docker/i686-linux-android/Dockerfile index 8a159cd0502b5..2715334708d41 100644 --- a/ci/docker/i686-linux-android/Dockerfile +++ b/ci/docker/i686-linux-android/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN dpkg --add-architecture i386 RUN apt-get update diff --git a/ci/docker/loongarch64-unknown-linux-gnu/Dockerfile b/ci/docker/loongarch64-unknown-linux-gnu/Dockerfile index 16b4cf4bfd34e..d99706888cf54 100644 --- a/ci/docker/loongarch64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/loongarch64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/loongarch64-unknown-linux-musl/Dockerfile b/ci/docker/loongarch64-unknown-linux-musl/Dockerfile index 0b3ff4da34ba0..2a55b29a8ffcb 100644 --- a/ci/docker/loongarch64-unknown-linux-musl/Dockerfile +++ b/ci/docker/loongarch64-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates curl gcc gcc-14-loongarch64-linux-gnu git libc6-dev \ diff --git a/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile b/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile index 76d8471a63aac..abdd6eb7c370c 100644 --- a/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile b/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile index c4c6af25b8684..a7d2ce30d96df 100644 --- a/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile +++ b/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/powerpc64le-unknown-linux-musl/Dockerfile b/ci/docker/powerpc64le-unknown-linux-musl/Dockerfile index b25f284eddf7a..b7d3c13fa02bf 100644 --- a/ci/docker/powerpc64le-unknown-linux-musl/Dockerfile +++ b/ci/docker/powerpc64le-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc make libc6-dev git curl ca-certificates \ diff --git a/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile b/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile index 0624e2c102055..c4b562aae1970 100644 --- a/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile +++ b/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/s390x-unknown-linux-gnu/Dockerfile b/ci/docker/s390x-unknown-linux-gnu/Dockerfile index dde2ef24254fc..0201fc48d7398 100644 --- a/ci/docker/s390x-unknown-linux-gnu/Dockerfile +++ b/ci/docker/s390x-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update && apt-get install -y --no-install-recommends \ curl ca-certificates \ diff --git a/ci/docker/s390x-unknown-linux-musl/Dockerfile b/ci/docker/s390x-unknown-linux-musl/Dockerfile index 2d4ea759c5fbf..c1f69b1a3097d 100644 --- a/ci/docker/s390x-unknown-linux-musl/Dockerfile +++ b/ci/docker/s390x-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update && apt-get install -y --no-install-recommends \ curl ca-certificates \ diff --git a/ci/docker/sparc64-unknown-linux-gnu/Dockerfile b/ci/docker/sparc64-unknown-linux-gnu/Dockerfile index 645cc3362ab93..2d19ed5d423bb 100644 --- a/ci/docker/sparc64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/sparc64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update && apt-get install -y --no-install-recommends \ curl ca-certificates \ diff --git a/ci/docker/wasm32-unknown-emscripten/Dockerfile b/ci/docker/wasm32-unknown-emscripten/Dockerfile index 0f9cb85dc30e8..5a5ea748259fd 100644 --- a/ci/docker/wasm32-unknown-emscripten/Dockerfile +++ b/ci/docker/wasm32-unknown-emscripten/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 # This is a workaround to avoid the interaction with tzdata. ENV DEBIAN_FRONTEND=noninteractive diff --git a/ci/docker/wasm32-wasip1/Dockerfile b/ci/docker/wasm32-wasip1/Dockerfile index e85b27ff82099..ec3e0b6d782cd 100644 --- a/ci/docker/wasm32-wasip1/Dockerfile +++ b/ci/docker/wasm32-wasip1/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 COPY wasi.sh / RUN /wasi.sh diff --git a/ci/docker/wasm32-wasip2/Dockerfile b/ci/docker/wasm32-wasip2/Dockerfile index be6bff3a843c5..364d89147a3a9 100644 --- a/ci/docker/wasm32-wasip2/Dockerfile +++ b/ci/docker/wasm32-wasip2/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 COPY wasi.sh / RUN /wasi.sh diff --git a/ci/docker/x86_64-linux-android/Dockerfile b/ci/docker/x86_64-linux-android/Dockerfile index 3bf350820019f..17039d2042d8a 100644 --- a/ci/docker/x86_64-linux-android/Dockerfile +++ b/ci/docker/x86_64-linux-android/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update && \ apt-get install -y --no-install-recommends \ diff --git a/ci/docker/x86_64-unknown-linux-gnu/Dockerfile b/ci/docker/x86_64-unknown-linux-gnu/Dockerfile index b6ad33ebc7cb5..51e23a76e997b 100644 --- a/ci/docker/x86_64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/x86_64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update RUN apt-get install -y --no-install-recommends \ diff --git a/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile b/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile index f50af741db564..1ae3eff3e4dfa 100644 --- a/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile +++ b/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update RUN apt-get install -y --no-install-recommends \ diff --git a/ci/docker/x86_64-unknown-linux-musl/Dockerfile b/ci/docker/x86_64-unknown-linux-musl/Dockerfile index 5c1b4b177880c..19b370c6cc8ab 100644 --- a/ci/docker/x86_64-unknown-linux-musl/Dockerfile +++ b/ci/docker/x86_64-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.10 +FROM ubuntu:25.10 RUN apt-get update RUN apt-get install -y --no-install-recommends \ diff --git a/libc-test/build.rs b/libc-test/build.rs index 8cb82e8a8d833..b9aa3910908fd 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2646,6 +2646,9 @@ fn test_freebsd(target: &str) { // Unaccessible in FreeBSD 15 "TDI_SWAPPED" | "P_SWAPPINGOUT" | "P_SWAPPINGIN" | "P_UNUSED3" => true, + // Only exists in FreeBSD 15+ + "P_IDLEPROC" if freebsd_ver < Some(15) => true, + // Removed in FreeBSD 14 (git a6b55ee6be1) "IFF_KNOWSEPOCH" => true, @@ -2869,6 +2872,15 @@ fn test_freebsd(target: &str) { // Added in FreeBSD 14.2 "SO_SPLICE" if Some(14) > freebsd_ver => true, + // FreeBSD 15 + "TIOCMGDTRWAIT" | "TIOCMSDTRWAIT" if freebsd_ver >= Some(15) => true, + + // Added in FreeBSD 15 + "_MC_HASTLSBASE" if freebsd_ver < Some(15) => true, + + // Changed in FreeBSD 15 + "_MC_FLAG_MASK" if freebsd_ver < Some(15) => true, + _ => false, } }); @@ -3065,8 +3077,9 @@ fn test_freebsd(target: &str) { // `tcp_snd_wscale` and `tcp_rcv_wscale` are bitfields ("tcp_info", "tcp_snd_wscale") => true, ("tcp_info", "tcp_rcv_wscale") => true, - // mc_spare can change in size between OS releases. It's a spare field, after all. - ("__mcontext", "mc_spare") => true, + + // __mcontext changed mc_spare and mc_tlsbase between OS releases. + (t, "mc_spare" | "mc_tlsbase") if t.contains("mcontext") => true, _ => false, } diff --git a/src/macros.rs b/src/macros.rs index d0a55fa2fca29..7347aeeb4ebdc 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -268,7 +268,8 @@ macro_rules! c_enum { // Use a specific type if provided, otherwise default to `c_uint` (@ty $repr:ty) => { $repr }; - (@ty) => { $crate::c_uint }; + // This has a space after `$crate` to avoid matching the regex for `crate::`. + (@ty) => { $crate :: c_uint }; } // This is a pretty horrible hack to allow us to conditionally mark some functions as 'const', diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 0535336e34511..a4e0a4c7c9424 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -6199,10 +6199,11 @@ cfg_if! { // These require a dependency on `libiconv`, and including this when built as // part of `std` means every Rust program gets it. Ideally we would have a link // modifier to only include these if they are used, but we do not. -#[deprecated(note = "Will be removed in 1.0 to avoid the `iconv` dependency")] #[cfg_attr(not(feature = "rustc-dep-of-std"), link(name = "iconv"))] extern "C" { + #[deprecated(note = "Will be removed in 1.0 to avoid the `iconv` dependency")] pub fn iconv_open(tocode: *const c_char, fromcode: *const c_char) -> iconv_t; + #[deprecated(note = "Will be removed in 1.0 to avoid the `iconv` dependency")] pub fn iconv( cd: iconv_t, inbuf: *mut *mut c_char, @@ -6210,6 +6211,7 @@ extern "C" { outbuf: *mut *mut c_char, outbytesleft: *mut size_t, ) -> size_t; + #[deprecated(note = "Will be removed in 1.0 to avoid the `iconv` dependency")] pub fn iconv_close(cd: iconv_t) -> c_int; } diff --git a/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs b/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs index fa85f11ce2812..26858269dfc80 100644 --- a/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs @@ -327,7 +327,8 @@ pub const MINSIGSTKSZ: size_t = 2048; // 512 * 4 pub const _MC_HASSEGS: u32 = 0x1; pub const _MC_HASBASES: u32 = 0x2; pub const _MC_HASFPXSTATE: u32 = 0x4; -pub const _MC_FLAG_MASK: u32 = _MC_HASSEGS | _MC_HASBASES | _MC_HASFPXSTATE; +pub const _MC_HASTLSBASE: u32 = 0x8; +pub const _MC_FLAG_MASK: u32 = _MC_HASSEGS | _MC_HASBASES | _MC_HASFPXSTATE | _MC_HASTLSBASE; pub const _MC_FPFMT_NODEV: c_long = 0x10000; pub const _MC_FPFMT_XMM: c_long = 0x10002;