Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
8f9ea89
Avoid usage of thread_local on DragonFlyBSD
bjorn3 Apr 6, 2024
af9f9bc
Simplify rustc-check-cfg emission in build.rs
bjorn3 Sep 26, 2025
9121031
libc-test: add mips to the sys_memfd_secret skip list
chenx97 Oct 8, 2025
a36153b
addinh issetugid() to *BSD based systems.
devnexen Oct 10, 2025
6d21cca
add HWCAP consts
brad0 Oct 1, 2025
1635ee1
Ignore false-positive warning
JohnTitor Oct 14, 2025
411ba5a
added cfmakeraw definition for target_os = nto
Sep 20, 2025
4a43b7b
added cfsetspeed definition for target_os = nto and target_env = nto80
Sep 22, 2025
149e37b
Add more wasi definitions for libstd
alexcrichton Oct 14, 2025
f24ed80
Update wasi-sdk used in testing
alexcrichton Oct 14, 2025
a8aeda6
More closely align pthread type reprs
alexcrichton Oct 15, 2025
d9c627f
Remove rogue definition of SIGSTKFLT for mips32-linux-musl
krobelus Oct 17, 2025
1f80843
test: Upgrade to the latest `ctest` beta release
tgross35 Nov 3, 2025
9044bfc
Add 'ucontext_t' and related structures and functions.
xingxue-ibm Sep 15, 2025
0b83b67
Move keyctl to new/linux_uapi
neuschaefer Jul 2, 2025
9b0bdf3
Enable range-diff with triagebot
tgross35 Oct 22, 2025
1cd874f
Assert the type created by `c_enum!`
tgross35 Oct 22, 2025
a107ba8
Add support for anonymous enums to `c_enum!`
tgross35 Oct 22, 2025
721e99f
redox: add setresgid and setresuid
willnode Oct 17, 2025
ef6ffc3
redox: define getresgid and getresuid
willnode Oct 17, 2025
47ff140
linux-musl-s390x: Add __psw_t/fprefset_t/*context_t
neuschaefer Jul 2, 2025
8e11334
ci: Upgrade to the windows-2025 runner
tgross35 Jul 24, 2025
03ad65a
MinGW: Set `L_tmpnam` and `TMP_MAX` to the UCRT value
tgross35 Jul 24, 2025
d7a83a3
Add contents of linux/can/bcm.h
coolreader18 Aug 29, 2025
18c5c49
Declare field 'tv_nsec' of structure 'timespec' as 'i32' in both 32-b…
xingxue-ibm Oct 17, 2025
1d37019
test: linux: Unskip `statx` and `statx_timestamp` tests
tgross35 Oct 22, 2025
be3e334
test: linux: Unskip `ip_mreqn` and `hwtstamp_config`
tgross35 Oct 22, 2025
86ce777
linux: Update the definition for `ucontext_t` and unskip its tests
tgross35 Oct 22, 2025
2ff345c
test: linux: Unskip `clone_args` and `open_how`
tgross35 Oct 22, 2025
8a020ce
linux: Remove incorrect `repr(align(8))` for `canxl_frame`
tgross35 Oct 22, 2025
2f7b5f0
test: linux: Unskip some types that now pass
tgross35 Oct 22, 2025
268a77f
test: linux: musl: Unskip types that needed newer kernel headers
tgross35 Oct 22, 2025
f67bc86
ci: Log the output of uname -a
tgross35 Oct 22, 2025
818b65f
ci: Update wasmtime to the latest release (38.0.2)
tgross35 Oct 23, 2025
eadf96f
test: linux: Unskip types and constants that are now available
tgross35 Oct 23, 2025
8d7f960
ci: Test x86_64-musl with musl 1.2.3
tgross35 Oct 23, 2025
b6d3705
linux: Correct the value of NFT_MSG_MAX
tgross35 Oct 23, 2025
f060e8f
ci: Remove the unused linux-sparc64 setup script
tgross35 Oct 23, 2025
143b5ce
Rename `missing!` to `extern_ty!`
tgross35 Oct 22, 2025
cbe9f02
Migrate manual extern types to `extern_ty!`
tgross35 Oct 22, 2025
25b6c8c
test: apple: Remove unneeded test skips
tgross35 Oct 23, 2025
cabf324
apple: Deprecate TIOCREMOTE
tgross35 Oct 23, 2025
3bcd65c
apple: Correct the value of `SF_SETTABLE`
tgross35 Oct 23, 2025
ad6dd56
test: Change the `headers!` macro to a syntax that rustfmt will format
tgross35 Oct 23, 2025
3f52956
style: Adjust a comment so rustfmt works
tgross35 Oct 23, 2025
97d388c
test: Use automatic test detection
tgross35 Jul 24, 2025
ce98b09
test: Commonize shared configuration
tgross35 Oct 23, 2025
a7cb0fc
apple: Port mcontext and ucontext to the new structure
tgross35 Oct 23, 2025
23a0500
linux: Switch from glob exports to select imports
tgross35 Oct 23, 2025
a786018
android: Switch from glob exports to select imports
tgross35 Oct 25, 2025
7cd894d
apple: Move xnu and apple_libc up a level in the new structure
tgross35 Oct 25, 2025
966725a
reorg: Fill in the `src/new` structure
tgross35 Oct 24, 2025
fb05ec7
fmt: Use vertical import formatting within `libc`
tgross35 Oct 25, 2025
0107464
nuttx: Resolve warnings
tgross35 Oct 25, 2025
63f5e44
teeos: Switch to the `s!` macro
tgross35 Oct 25, 2025
dfe4fe0
wali: Fix unknown config
tgross35 Oct 25, 2025
73d83da
espidf: Fix the duplicate definition of gethostname
tgross35 Oct 25, 2025
f8339e8
ci: Ignore `repr_align_removed` for cargo-semver-checks
tgross35 Nov 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
name: Clippy on ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-15, windows-2022]
os: [ubuntu-24.04, macos-15, windows-2025]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
Expand All @@ -52,7 +52,7 @@ jobs:
strategy:
matrix:
toolchain: [stable, nightly, 1.63.0]
os: [ubuntu-24.04, macos-15, windows-2022]
os: [ubuntu-24.04, macos-15, windows-2025]
include:
- toolchain: beta
os: ubuntu-24.04
Expand Down Expand Up @@ -113,19 +113,19 @@ jobs:
- target: aarch64-apple-darwin
os: macos-15
- target: x86_64-pc-windows-gnu
os: windows-2022
os: windows-2025
env:
ARCH_BITS: 64
ARCH: x86_64
- target: x86_64-pc-windows-msvc
os: windows-2022
os: windows-2025
# FIXME: It currently causes segfaults.
#- target: i686-pc-windows-gnu
# env:
# ARCH_BITS: 32
# ARCH: i686
- target: i686-pc-windows-msvc
os: windows-2022
os: windows-2025
runs-on: ${{ matrix.os }}
timeout-minutes: 25
env:
Expand Down Expand Up @@ -225,6 +225,9 @@ jobs:
- target: powerpc64le-unknown-linux-musl
env:
RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1
- target: x86_64-unknown-linux-musl
env:
RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1
# FIXME(ppc): SIGILL running tests, see
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
# - target: powerpc-unknown-linux-gnu
Expand Down
67 changes: 42 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,7 @@ expl_impl_clone_on_copy = "allow"
uninlined_format_args = "allow"
unnecessary_cast = "allow" # some casts like `as usize` are only needed for some targets
used_underscore_binding = "allow"

[package.metadata.cargo-semver-checks.lints]
# Alignment is an internal detail that users must not rely upon
repr_align_removed = "warn"
19 changes: 2 additions & 17 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const ALLOWED_CFGS: &[&str] = &[
// Corresponds to `_TIME_BITS=64` in glibc
"gnu_time_bits64",
"libc_deny_warnings",
"libc_thread_local",
// Corresponds to `__USE_TIME_BITS64` in UAPI
"linux_time_bits64",
"musl_v1_2_3",
Expand Down Expand Up @@ -47,7 +46,6 @@ fn main() {
println!("cargo:rerun-if-changed=build.rs");

let (rustc_minor_ver, _is_nightly) = rustc_minor_nightly();
let rustc_dep_of_std = env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok();
let libc_ci = env::var("LIBC_CI").is_ok();
let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default();
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
Expand Down Expand Up @@ -143,28 +141,15 @@ fn main() {
set_cfg("libc_deny_warnings");
}

// #[thread_local] is currently unstable
if rustc_dep_of_std {
set_cfg("libc_thread_local");
}

// Since Rust 1.80, configuration that isn't recognized by default needs to be provided to
// avoid warnings.
if rustc_minor_ver >= 80 {
for cfg in ALLOWED_CFGS {
if rustc_minor_ver >= 75 {
println!("cargo:rustc-check-cfg=cfg({cfg})");
} else {
println!("cargo:rustc-check-cfg=values({cfg})");
}
println!("cargo:rustc-check-cfg=cfg({cfg})");
}
for &(name, values) in CHECK_CFG_EXTRA {
let values = values.join("\",\"");
if rustc_minor_ver >= 75 {
println!("cargo:rustc-check-cfg=cfg({name},values(\"{values}\"))");
} else {
println!("cargo:rustc-check-cfg=values({name},\"{values}\")");
}
println!("cargo:rustc-check-cfg=cfg({name},values(\"{values}\"))");
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions ci/docker/sparc64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
qemu-system-sparc64 openbios-sparc seabios ipxe-qemu \
p7zip-full cpio linux-libc-dev-sparc64-cross qemu-user

COPY linux-sparc64.sh /
RUN /linux-sparc64.sh

ENV CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_LINKER=sparc64-linux-gnu-gcc \
CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_RUNNER="qemu-sparc64 -L /usr/sparc64-linux-gnu" \
CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
Expand Down
19 changes: 0 additions & 19 deletions ci/linux-sparc64.sh

This file was deleted.

3 changes: 3 additions & 0 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ target="$1"

export RUST_BACKTRACE="${RUST_BACKTRACE:-1}"

# For logging
uname -a

cmd="cargo test --target $target ${LIBC_CI_ZBUILD_STD+"-Zbuild-std"}"
test_flags="--skip check_style"

Expand Down
9 changes: 8 additions & 1 deletion ci/style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,21 @@ while IFS= read -r file; do
# wouldn't be correct for something like `all(any(...), ...)`).
perl -pi -0777 -e 's/if #\[cfg\((.*?)\)\]/if cfg_tmp!([$1])/gms' "$file"

# The `c_enum!` macro allows anonymous enums without names, which
# isn't valid syntax. Replace it with a dummy name and an indicator
# comment on the preceding line (which is where rustfmt puts it. Also
# rust-lang/rustfmt#5464).
perl -pi -e 's/^(\s*)(.*)enum #anon\b/$1\/\* FMT-ANON-ENUM \*\/\n$1$2enum _fmt_anon/g' "$file"

# Format the file. We need to invoke `rustfmt` directly since `cargo fmt`
# can't figure out the module tree with the hacks in place.
failed=false
rustfmt --config-path rustfmt.toml "$file" ${check:+"$check"} || failed=true
rustfmt "$file" ${check:+"$check"} || failed=true

# Restore all changes to the files.
perl -pi -e 's/fn (\w+)_fmt_tmp\(\)/$1!/g' "$file"
perl -pi -0777 -e 's/cfg_tmp!\(\[(.*?)\]\)/#[cfg($1)]/gms' "$file"
perl -pi -0777 -e 's/\/\* FMT-ANON-ENUM \*\/(?:\n\s*)?(.*?)enum _fmt_anon/$1enum #anon/gms' "$file"

# Defer emitting the failure until after the files get reset
if [ "$failed" != "false" ]; then
Expand Down
4 changes: 2 additions & 2 deletions ci/wasi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ apt-get install -y --no-install-recommends \

# Wasmtime is used to execute tests and wasi-sdk is used to compile tests.
# Download appropriate versions here and configure various flags below.
wasmtime=35.0.0
wasi_sdk=25
wasmtime=38.0.2
wasi_sdk=27

curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v$wasmtime/wasmtime-v$wasmtime-x86_64-linux.tar.xz |
tar xJf -
Expand Down
Loading
Loading