Make iced_wgpu build on redox

This commit is contained in:
Jeremy Soller 2024-10-09 10:02:48 -06:00 committed by Ashley Wulber
parent 08fe1f3aa5
commit 64ef6b2724
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
3 changed files with 56 additions and 71 deletions

View file

@ -1,19 +1,19 @@
//! Display rendering results on windows.
pub mod compositor;
#[cfg(all(unix, not(target_os = "macos")))]
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "redox")))]
mod wayland;
#[cfg(all(unix, not(target_os = "macos")))]
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "redox")))]
mod x11;
pub use compositor::Compositor;
pub use wgpu::Surface;
#[cfg(all(unix, not(target_os = "macos")))]
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "redox")))]
use rustix::fs::{major, minor};
#[cfg(all(unix, not(target_os = "macos")))]
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "redox")))]
use std::{fs::File, io::Read, path::PathBuf};
#[cfg(all(unix, not(target_os = "macos")))]
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "redox")))]
fn ids_from_dev(dev: u64) -> Option<(u16, u16)> {
let path = PathBuf::from(format!(
"/sys/dev/char/{}:{}/device",