Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/backend/egl/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ pub mod egl {
use std::sync::{LazyLock, Once};

pub static LIB: LazyLock<Library> =
LazyLock::new(|| unsafe { Library::new("libEGL.so.1") }.expect("Failed to load LibEGL"));
LazyLock::new(|| unsafe { Library::new("libEGL.so") }.expect("Failed to load LibEGL"));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Debian libEGL.so is part of the libegl-dev package, which end users do not normally have installed. You did probably have to make the filename conditional on OpenBSD.


pub static LOAD: Once = Once::new();
pub static DEBUG: Once = Once::new();
Expand Down
6 changes: 6 additions & 0 deletions src/wayland/drm_syncobj/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ pub use sync_point::*;

/// Test if DRM device supports `syncobj_eventfd`.
// Similar to test used in Mutter
#[cfg(not(target_os = "openbsd"))]
pub fn supports_syncobj_eventfd(device: &DrmDeviceFd) -> bool {
// Pass device as placeholder for eventfd as well, since `drm_ffi` requires
// a valid fd.
Expand All @@ -75,6 +76,11 @@ pub fn supports_syncobj_eventfd(device: &DrmDeviceFd) -> bool {
}
}

#[cfg(target_os = "openbsd")]
pub fn supports_syncobj_eventfd(device: &DrmDeviceFd) -> bool {
false
}

/// Handler trait for DRM syncobj protocol.
pub trait DrmSyncobjHandler {
/// Returns a mutable reference to the [`DrmSyncobjState`] delegate type
Expand Down
6 changes: 6 additions & 0 deletions src/wayland/drm_syncobj/sync_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ pub struct DrmSyncPoint {

impl DrmSyncPoint {
/// Create an eventfd that will be signaled by the syncpoint
#[cfg(not(target_os = "openbsd"))]
pub fn eventfd(&self) -> io::Result<Arc<OwnedFd>> {
let fd = rustix::event::eventfd(
0,
Expand All @@ -131,6 +132,11 @@ impl DrmSyncPoint {
Ok(fd)
}

#[cfg(target_os = "openbsd")]
pub fn eventfd(&self) -> io::Result<Arc<OwnedFd>> {
Err(io::Error::other("oh no!"))
}

/// Signal the sync point.
pub fn signal(&self) -> io::Result<()> {
let ctx = self.timeline.0.dev_ctx.lock().unwrap();
Expand Down
Loading