Use rustix/libc instead of nix
Partly addresses https://github.com/rust-windowing/softbuffer/issues/147, though it would still be desirable to have a good safe API for SYSV shm in Rustix. But using `libc` directly for now is no worse than using the `nix::libc` re-export, so we don't lose anything.
This commit is contained in:
parent
ea81ff2078
commit
d0d3881099
4 changed files with 19 additions and 36 deletions
|
|
@ -332,10 +332,8 @@ impl BufferImpl<'_> {
|
|||
// this is going to fail. Low hanging fruit PR: add a flag that's set to false if this
|
||||
// returns `ENOSYS` and check that before allocating the above and running this.
|
||||
match self.display.dirty_framebuffer(self.front_fb, &rectangles) {
|
||||
Ok(())
|
||||
| Err(drm::SystemError::Unknown {
|
||||
errno: nix::errno::Errno::ENOSYS,
|
||||
}) => {}
|
||||
Ok(()) => {}
|
||||
Err(drm::SystemError::Unknown { errno }) if errno as i32 == libc::ENOSYS => {}
|
||||
Err(e) => {
|
||||
return Err(SoftBufferError::PlatformError(
|
||||
Some("failed to dirty framebuffer".into()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue