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.
This commit is contained in:
Fabian Boehm 2023-05-23 17:27:14 +02:00
parent 8282ddcff2
commit f2e5f02a8a

View File

@ -4,11 +4,13 @@ use std::fs::{File, Metadata};
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