Skip to content

Commit 2ec485e

Browse files
committed
Remove direct libc dependency
Replaces uses of `libc::dev_t` with `rustix::fs::Dev`. `libc` (which is used through `rustix`) also supports the FreeBSD 12 ABI now, so the workaround isn't needed.
1 parent 43c4515 commit 2ec485e

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ rustdoc-args = ["--cfg", "docsrs"]
2020
bitflags = "2.4"
2121
bytemuck = { version = "1.13.0", optional = true }
2222
cursor-icon = "1.2.0"
23-
libc = "0.2.148"
2423
log = "0.4"
2524
memmap2 = "0.9.0"
26-
rustix = { version = "1.0.7", features = ["fs", "pipe", "shm"] }
25+
rustix = { version = "1.1.4", features = ["fs", "pipe", "shm"] }
2726
thiserror = "2.0.12"
2827
wayland-backend = "0.3.0"
2928
wayland-client = "0.31.1"

src/dmabuf.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::{error::GlobalError, globals::GlobalData, registry::GlobalProxy};
22
use memmap2::{Mmap, MmapOptions};
3+
use rustix::fs::Dev as dev_t;
34
use std::{fmt, mem, os::unix::io::BorrowedFd, slice, sync::Mutex};
45
use wayland_client::{
56
globals::GlobalList,
@@ -12,12 +13,6 @@ use wayland_protocols::wp::linux_dmabuf::zv1::client::{
1213
zwp_linux_dmabuf_v1,
1314
};
1415

15-
// Workaround until `libc` updates to FreeBSD 12 ABI
16-
#[cfg(target_os = "freebsd")]
17-
type dev_t = u64;
18-
#[cfg(not(target_os = "freebsd"))]
19-
use libc::dev_t;
20-
2116
/// A preference tranche of dmabuf formats
2217
#[derive(Clone, Debug)]
2318
pub struct DmabufFeedbackTranche {

0 commit comments

Comments
 (0)