From f2e5f02a8a3db82735e850d31e2c2d09191f574c Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Tue, 23 May 2023 17:27:14 +0200 Subject: [PATCH] fileid: Use freebsd metadata This is a terrible way of going about things, and means we're currently broken on any unix that isn't specifically listed. But at least it'll build and allow us to keep the FreeBSD CI running. --- fish-rust/src/wutil/fileid.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fish-rust/src/wutil/fileid.rs b/fish-rust/src/wutil/fileid.rs index 943a89f38..8e906e152 100644 --- a/fish-rust/src/wutil/fileid.rs +++ b/fish-rust/src/wutil/fileid.rs @@ -4,11 +4,13 @@ use std::os::fd::RawFd; use std::os::fd::{FromRawFd, IntoRawFd}; +#[cfg(target_os = "freebsd")] +use std::os::freebsd::fs::MetadataExt; #[cfg(target_os = "linux")] use std::os::linux::fs::MetadataExt; #[cfg(target_os = "macos")] use std::os::macos::fs::MetadataExt; -#[cfg(not(any(target_os = "macos", target_os = "linux")))] +#[cfg(not(any(target_os = "macos", target_os = "linux", target_os = "freebsd")))] use std::os::unix::fs::MetadataExt; /// Struct for representing a file's inode. We use this to detect and avoid symlink loops, among