From fd89ea5d780fa111d12fbe6644dc4153a78565c5 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 7 Jan 2024 09:10:47 -0700 Subject: [PATCH] Stub for get_mount_points on unsupported targets --- src/freedesktop.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/freedesktop.rs b/src/freedesktop.rs index 402e8fa..220bf43 100644 --- a/src/freedesktop.rs +++ b/src/freedesktop.rs @@ -808,6 +808,18 @@ fn get_mount_points() -> Result, Error> { Ok(result) } +#[cfg(not(any( + target_os = "linux", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "openbsd", + target_os = "netbsd" +)))] +fn get_mount_points() -> Result, Error> { + // On platforms that don't have support yet, simply return no mount points + Ok(Vec::new()) +} + #[cfg(test)] mod tests { use serial_test::serial;