redox-driver-sys: import Once (fix redox-target build break)
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.
This commit is contained in:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user