1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

Merge pull request #5462 from kostikbel/main

freebsd: fix the 'df' command
This commit is contained in:
Daniel Hofstetter 2023-10-29 13:51:16 +01:00 committed by GitHub
commit 9697f56e94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@
//! Set of functions to manage file systems
// spell-checker:ignore DATETIME subsecond (arch) bitrig ; (fs) cifs smbfs
// spell-checker:ignore DATETIME getmntinfo subsecond (arch) bitrig ; (fs) cifs smbfs
use time::macros::format_description;
use time::UtcOffset;
@ -362,13 +362,19 @@ extern "C" {
fn get_mount_info(mount_buffer_p: *mut *mut StatFs, flags: c_int) -> c_int;
#[cfg(any(
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd",
all(target_vendor = "apple", target_arch = "aarch64")
))]
#[link_name = "getmntinfo"] // spell-checker:disable-line
fn get_mount_info(mount_buffer_p: *mut *mut StatFs, flags: c_int) -> c_int;
// Rust on FreeBSD uses 11.x ABI for filesystem metadata syscalls.
// Call the right version of the symbol for getmntinfo() result to
// match libc StatFS layout.
#[cfg(target_os = "freebsd")]
#[link_name = "getmntinfo@FBSD_1.0"] // spell-checker:disable-line
fn get_mount_info(mount_buffer_p: *mut *mut StatFs, flags: c_int) -> c_int;
}
#[cfg(any(target_os = "linux", target_os = "android"))]