Merge pull request #19055 from vkrivopalov/fix-testdir-unused-variable-warning-on-freebsd

Add FreeBSD as a target OS for TestDir to avoid warnings
This commit is contained in:
Chayim Refael Friedman 2025-01-27 20:16:57 +00:00 committed by GitHub
commit a995319633
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,10 +43,15 @@ impl TestDir {
}
fs::create_dir_all(&path).unwrap();
#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
#[cfg(any(
target_os = "macos",
target_os = "linux",
target_os = "windows",
target_os = "freebsd"
))]
if symlink {
let symlink_path = base.join(format!("{pid}_{cnt}_symlink"));
#[cfg(any(target_os = "macos", target_os = "linux"))]
#[cfg(any(target_os = "macos", target_os = "linux", target_os = "freebsd"))]
std::os::unix::fs::symlink(path, &symlink_path).unwrap();
#[cfg(target_os = "windows")]