From f9456e80c3660f14658067b791bcb6bb79b11c51 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 23 Apr 2020 11:23:33 +0200 Subject: [PATCH] fix(df): Add support for freebsd --- src/uu/df/df.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/uu/df/df.rs b/src/uu/df/df.rs index 0dcedc8ce..2f0201c83 100755 --- a/src/uu/df/df.rs +++ b/src/uu/df/df.rs @@ -32,17 +32,20 @@ use std::collections::HashSet; use std::ffi::CString; use std::{env, mem}; -#[cfg(target_os = "macos")] +#[cfg(any(target_os = "macos", target_os = "freebsd"))] use libc::c_int; #[cfg(target_os = "macos")] use libc::statfs; -#[cfg(target_os = "macos")] +#[cfg(any(target_os = "macos", target_os = "freebsd"))] use std::ffi::CStr; -#[cfg(target_os = "macos")] +#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "windows"))] use std::ptr; -#[cfg(target_os = "macos")] +#[cfg(any(target_os = "macos", target_os = "freebsd"))] use std::slice; +#[cfg(target_os = "freebsd")] +use libc::{c_char, fsid_t, uid_t}; + #[cfg(target_os = "linux")] use std::fs::File; #[cfg(target_os = "linux")]