[PATCH] D33695: [Solaris] Fix PR33228 - llvm::sys::fs::is_local_impl done right

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 30 15:57:16 PDT 2017


fedor.sergeev updated this revision to Diff 100794.
fedor.sergeev added a comment.

__sun__ -> __sun


https://reviews.llvm.org/D33695

Files:
  lib/Support/Unix/Path.inc


Index: lib/Support/Unix/Path.inc
===================================================================
--- lib/Support/Unix/Path.inc
+++ lib/Support/Unix/Path.inc
@@ -381,6 +381,11 @@
 #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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33695.100794.patch
Type: text/x-patch
Size: 583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170530/f8b2240a/attachment.bin>


More information about the llvm-commits mailing list