Fixes for Redox when part of unix target family

This commit is contained in:
Jeremy Soller
2019-04-23 13:55:46 -06:00
parent 219bf26966
commit 015d352e33
3 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -4,13 +4,13 @@ use std::path::Path;
use disk::Disk;
use filesystem::FileSystem;
#[cfg(unix)]
#[cfg(not(target_os = "redox"))]
mod fuse;
#[cfg(target_os = "redox")]
mod redox;
#[cfg(all(unix, target_os = "macos"))]
#[cfg(target_os = "macos")]
pub fn mount<D: Disk, P: AsRef<Path>, F: FnMut()>(filesystem: FileSystem<D>, mountpoint: &P, callback: F) -> io::Result<()> {
use std::ffi::OsStr;
@@ -24,7 +24,7 @@ pub fn mount<D: Disk, P: AsRef<Path>, F: FnMut()>(filesystem: FileSystem<D>, mou
])
}
#[cfg(all(unix, not(target_os = "macos")))]
#[cfg(all(not(target_os = "macos"), not(target_os = "redox")))]
pub fn mount<D: Disk, P: AsRef<Path>, F: FnMut()>(filesystem: FileSystem<D>, mountpoint: &P, callback: F) -> io::Result<()> {
fuse::mount(filesystem, mountpoint, callback, &[])
}