##// END OF EJS Templates
rust: fix building on macOS (issue6801)...
Dan Villiom Podlaski Christiansen -
r51182:0cc19a53 stable
parent child Browse files
Show More
@@ -415,9 +415,9 b' impl Node {'
415 415
416 416 fn synthesize_unix_mode(&self) -> u32 {
417 417 let file_type = if self.flags().contains(Flags::MODE_IS_SYMLINK) {
418 libc::S_IFLNK
418 libc::S_IFLNK as u32
419 419 } else {
420 libc::S_IFREG
420 libc::S_IFREG as u32
421 421 };
422 422 let permissions = if self.flags().contains(Flags::MODE_EXEC_PERM) {
423 423 0o755
@@ -193,3 +193,13 b' pub(crate) fn is_on_nfs_mount(path: impl'
193 193 r == 0 && buf.f_type as u32 == libc::NFS_SUPER_MAGIC as u32
194 194 }
195 195 }
196
197 /// Similar to what Cargo does; although detecting NFS (or non-local
198 /// file systems) _should_ be possible on other operating systems,
199 /// we'll just assume that mmap() works there, for now; after all,
200 /// _some_ functionality is better than a compile error, i.e. none at
201 /// all
202 #[cfg(not(target_os = "linux"))]
203 pub(crate) fn is_on_nfs_mount(_path: impl AsRef<Path>) -> bool {
204 false
205 }
General Comments 0
You need to be logged in to leave comments. Login now