From 1125c008bc5cc47728807f4e62c665f23cc2aa50 Mon Sep 17 00:00:00 2001 From: vasilito Date: Fri, 24 Jul 2026 14:24:44 +0900 Subject: [PATCH] redox-driver-sys: import Once (fix redox-target build break) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit d945483915 added a per-thread IOPL guard using std::sync::Once in a #[cfg(target_os = "redox")] thread_local! (pci.rs:20) but did not import Once, so redox-driver-sys fails to compile for x86_64-unknown-redox with E0425 "cannot find type Once" — breaking redox-drm (the /scheme/drm/card0 provider) and driver-manager in the redbear-full build. Add the cfg-gated import. Found while driving the redbear-full desktop build. --- local/recipes/drivers/redox-driver-sys/source/src/pci.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/local/recipes/drivers/redox-driver-sys/source/src/pci.rs b/local/recipes/drivers/redox-driver-sys/source/src/pci.rs index 362aaa27f7..7c6f2f1650 100644 --- a/local/recipes/drivers/redox-driver-sys/source/src/pci.rs +++ b/local/recipes/drivers/redox-driver-sys/source/src/pci.rs @@ -1,4 +1,8 @@ use std::io::{Read, Seek, SeekFrom, Write}; +// `Once` backs the per-thread IOPL guard below (Redox-only). Gated to match the +// `#[cfg(target_os = "redox")]` thread_local so non-Redox builds don't warn on +// an unused import. +#[cfg(target_os = "redox")] use std::sync::Once; use crate::{DriverError, Result};