x11: Use POSIX shared memory in X11 backend
The X11 backend used System-V shared memory to communicate shared buffers to the server, but rustix does not support SysV SHM so we had to use libc in this backend. However, there is an alternate X11 API which uses POSIX shared memory, which rustix does support. This PR switches the X11 backend to POSIX shared memory and purges the previous usages of libc. The goal is to remove libc totally. Therefore this PR also removes the default libc dependency from rustix. Signed-off-by: John Nunley <dev@notgull.net>
This commit is contained in:
parent
a405e0341d
commit
c0e8723081
3 changed files with 91 additions and 45 deletions
|
|
@ -333,7 +333,8 @@ impl BufferImpl<'_> {
|
|||
// 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 }) if errno as i32 == libc::ENOSYS => {}
|
||||
Err(drm::SystemError::Unknown { errno })
|
||||
if errno as i32 == rustix::io::Errno::NOSYS.raw_os_error() => {}
|
||||
Err(e) => {
|
||||
return Err(SoftBufferError::PlatformError(
|
||||
Some("failed to dirty framebuffer".into()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue