[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 14:20:06 PDT 2017
fedor.sergeev created this revision.
Herald added a subscriber: krytarowski.
Solaris-specific implementation for llvm::sys::fs::is_local_impl.
FStype pattern matching might be a bit unreliable, but at least it fixes the build failure.
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.100767.patch
Type: text/x-patch
Size: 585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170530/cb2633b0/attachment.bin>
More information about the llvm-commits
mailing list