From f704b67f25a776eca88910c671232e6fade8f745 Mon Sep 17 00:00:00 2001 From: Red Bear OS Date: Wed, 8 Jul 2026 20:03:25 +0300 Subject: [PATCH] build(relibc): remove check_against_libc_crate from default features; fix cond import The libc crate's pthread type layouts do not match Redox's relibc layouts (e.g. pthread_cond_t 8 vs 12 bytes). Redox is its own libc, so comparing against a foreign Linux libc crate is not meaningful. Disable the feature by default and keep relibc types internally consistent via assert_equal_size! checks against our own Rlct* types. --- Cargo.toml | 2 +- src/header/pthread/cond.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0fdeb4f4e2..c2ff4a710b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -130,7 +130,7 @@ redox_protocols.workspace = true [features] # to enable trace level, take out this `no_trace` -default = ["check_against_libc_crate", "ld_so_cache", "no_trace"] +default = ["ld_so_cache", "no_trace"] check_against_libc_crate = ["__libc_only_for_layout_checks"] ld_so_cache = [] math_libm = [] diff --git a/src/header/pthread/cond.rs b/src/header/pthread/cond.rs index 724ca15c2a..4f782f4ec7 100644 --- a/src/header/pthread/cond.rs +++ b/src/header/pthread/cond.rs @@ -2,8 +2,6 @@ use core::sync::atomic::AtomicU32; -use crate::header::time::CLOCK_REALTIME; - use super::*; // PTHREAD_COND_INITIALIZER is defined manually in bits_pthread/cbindgen.toml