Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/vfs.rs @ 50274:0cc19a53cef4 stable
rust: fix building on macOS (issue6801)
The VFS change is copied over from Cargo, and likely to apply to other
platforms as well.
The dirstate change is essentially a replay of 440972d2175d, which was
reverted in e98fd81bb151, part of !383, to silence some clippy
warnings.
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Tue, 07 Mar 2023 13:39:31 +0100 |
parents | a6b8b1ab9116 |
children | db7dbe6f7bb2 |
line wrap: on
line diff
--- a/rust/hg-core/src/vfs.rs Wed Mar 08 00:46:53 2023 +0100 +++ b/rust/hg-core/src/vfs.rs Tue Mar 07 13:39:31 2023 +0100 @@ -193,3 +193,13 @@ r == 0 && buf.f_type as u32 == libc::NFS_SUPER_MAGIC as u32 } } + +/// Similar to what Cargo does; although detecting NFS (or non-local +/// file systems) _should_ be possible on other operating systems, +/// we'll just assume that mmap() works there, for now; after all, +/// _some_ functionality is better than a compile error, i.e. none at +/// all +#[cfg(not(target_os = "linux"))] +pub(crate) fn is_on_nfs_mount(_path: impl AsRef<Path>) -> bool { + false +}