Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freebsd: include missing libc crate #205

Merged
merged 1 commit into from
Oct 24, 2024
Merged
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
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ drm-ffi = { path = "drm-ffi", version = "0.9.0" }
drm-fourcc = "^2.2.0"
rustix = { version = "0.38.22", features = ["mm", "fs"] }

[target.'cfg(target_os = "freebsd")'.dependencies]
libc = "0.2"

[dev-dependencies]
image = { version = "0.24", default-features = false, features = ["png"] }
rustix = { version = "0.38.22", features = ["event", "mm"] }
Expand Down
4 changes: 2 additions & 2 deletions src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ pub fn dev_path(dev: dev_t, ty: NodeType) -> io::Result<PathBuf> {

/// Returns the path of a specific type of node from the DRM device described by major and minor device numbers.
#[cfg(target_os = "freebsd")]
fn dev_path(dev: dev_t, ty: NodeType) -> io::Result<PathBuf> {
pub fn dev_path(dev: dev_t, ty: NodeType) -> io::Result<PathBuf> {
// Based on libdrm `drmGetMinorNameForFD`. Should be updated if the code
// there is replaced with anything more sensible...

Expand Down Expand Up @@ -352,7 +352,7 @@ fn dev_path(dev: dev_t, ty: NodeType) -> io::Result<PathBuf> {

/// Returns the path of a specific type of node from the DRM device described by major and minor device numbers.
#[cfg(not(any(target_os = "linux", target_os = "freebsd")))]
fn dev_path(dev: dev_t, ty: NodeType) -> io::Result<PathBuf> {
pub fn dev_path(dev: dev_t, ty: NodeType) -> io::Result<PathBuf> {
use std::io::ErrorKind;

if !is_device_drm(dev) {
Expand Down
Loading