mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[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
This commit is contained in:
parent
f2d855ab6e
commit
d2f50a9b16
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user