mesa3d: util: rust: add proper stubs

Fixes some errors when compiling on non-traditional platforms.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37097>
This commit is contained in:
Gurchetan Singh 2025-08-29 15:49:03 -07:00 committed by Marge Bot
parent 68f957292e
commit 8a9baab791
3 changed files with 15 additions and 0 deletions

View file

@ -10,6 +10,9 @@ pub mod stub;
#[cfg(windows)]
pub mod windows;
// Only Linux works for all cases. Windows works for HANDLEs.
// Tracking bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13826
cfg_if::cfg_if! {
if #[cfg(any(target_os = "android", target_os = "linux"))] {
pub use linux as platform;

View file

@ -42,3 +42,9 @@ impl Listener {
Err(MesaError::Unsupported)
}
}
impl AsBorrowedDescriptor for Listener {
fn as_borrowed_descriptor(&self) -> &OwnedDescriptor {
unimplemented!()
}
}

View file

@ -42,3 +42,9 @@ impl Listener {
Err(MesaError::Unsupported)
}
}
impl AsBorrowedDescriptor for Listener {
fn as_borrowed_descriptor(&self) -> &OwnedDescriptor {
unimplemented!()
}
}