File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 49
49
// For GNU Hurd
50
50
#if defined(__GNU__) && !defined(PATH_MAX)
51
51
# define PATH_MAX 4096
52
+ # define MAXPATHLEN 4096
52
53
#endif
53
54
54
55
#include < sys/types.h>
82
83
#define STATVFS_F_FRSIZE (vfs ) static_cast <uint64_t >(vfs.f_bsize)
83
84
#endif
84
85
85
- #if defined(__NetBSD__)
86
+ #if defined(__NetBSD__) || defined(__GNU__)
86
87
#define STATVFS_F_FLAG (vfs ) (vfs).f_flag
87
88
#else
88
89
#define STATVFS_F_FLAG (vfs ) (vfs).f_flags
@@ -98,7 +99,7 @@ const file_t kInvalidFile = -1;
98
99
99
100
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
100
101
defined (__minix) || defined(__FreeBSD_kernel__) || defined(__linux__) || \
101
- defined(__CYGWIN__) || defined(__DragonFly__) || defined(_AIX)
102
+ defined(__CYGWIN__) || defined(__DragonFly__) || defined(_AIX) || defined(__GNU__)
102
103
static int
103
104
test_dir(char ret[PATH_MAX], const char *dir, const char *bin)
104
105
{
@@ -347,7 +348,7 @@ std::error_code remove(const Twine &path, bool IgnoreNonExisting) {
347
348
}
348
349
349
350
static bool is_local_impl (struct STATVFS &Vfs) {
350
- #if defined(__linux__)
351
+ #if defined(__linux__) || defined(__GNU__)
351
352
#ifndef NFS_SUPER_MAGIC
352
353
#define NFS_SUPER_MAGIC 0x6969
353
354
#endif
@@ -357,7 +358,11 @@ static bool is_local_impl(struct STATVFS &Vfs) {
357
358
#ifndef CIFS_MAGIC_NUMBER
358
359
#define CIFS_MAGIC_NUMBER 0xFF534D42
359
360
#endif
361
+ #ifdef __GNU__
362
+ switch ((uint32_t )Vfs.__f_type ) {
363
+ #else
360
364
switch ((uint32_t )Vfs.f_type ) {
365
+ #endif
361
366
case NFS_SUPER_MAGIC:
362
367
case SMB_SUPER_MAGIC:
363
368
case CIFS_MAGIC_NUMBER:
You can’t perform that action at this time.
0 commit comments