diff options
author | Kamil Rytarowski <n54@gmx.com> | 2017-06-01 12:57:00 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2017-06-01 12:57:00 +0000 |
commit | 07c81b18561b135ee5630d63f189800467a21ca2 (patch) | |
tree | a4a06be5c823df268303599f290ebc2ca9a3fe26 /llvm/lib/Support/Unix | |
parent | 1d498f26c68c11395d6f85a4a0f266f9676abdd2 (diff) | |
download | bcm5719-llvm-07c81b18561b135ee5630d63f189800467a21ca2.tar.gz bcm5719-llvm-07c81b18561b135ee5630d63f189800467a21ca2.zip |
[Solaris] Fix PR33228 - llvm::sys::fs::is_local_impl done right
Summary:
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.
Reviewers: mgorny, nlopes, llvm-commits, krytarowski
Reviewed By: krytarowski
Subscribers: voskresensky.vladimir, krytarowski
Differential Revision: https://reviews.llvm.org/D33695
llvm-svn: 304412
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r-- | llvm/lib/Support/Unix/Path.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc index fa28ba1b6ab..ce638d453c1 100644 --- a/llvm/lib/Support/Unix/Path.inc +++ b/llvm/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 |