From f382538d471e38a9b98f016c4caebd24c8d60b62 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 1 Jun 2017 20:58:36 +0000 Subject: Vendor import of llvm trunk r304460: https://llvm.org/svn/llvm-project/llvm/trunk@304460 --- lib/Support/Unix/Path.inc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/Support/Unix') diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index fa28ba1b6ab6a..ce638d453c19d 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -381,6 +381,11 @@ static bool is_local_impl(struct STATVFS &Vfs) { #elif defined(__CYGWIN__) // Cygwin doesn't expose this information; would need to use Win32 API. return false; +#elif defined(__sun) + // statvfs::f_basetype contains a null-terminated FSType name of the mounted target + StringRef fstype(Vfs.f_basetype); + // NFS is the only non-local fstype?? + return !fstype.equals("nfs"); #else return !!(STATVFS_F_FLAG(Vfs) & MNT_LOCAL); #endif -- cgit v1.2.3