From: LLVM Packaging Team Date: Thu, 11 Jul 2019 03:08:05 +0000 (+0100) Subject: hurd-lib_Support_Unix_Path.inc X-Git-Tag: archive/raspbian/1%6.0.1-12+rpi1~14 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ac6aafbac9c05a97065dad2c3f76dee82f180fe8;p=llvm-toolchain-6.0.git hurd-lib_Support_Unix_Path.inc =================================================================== Gbp-Pq: Name hurd-lib_Support_Unix_Path.inc.diff --- diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index b8ab955d..bafe57e5 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -98,7 +98,7 @@ #define STATVFS_F_FRSIZE(vfs) static_cast(vfs.f_bsize) #endif -#if defined(__NetBSD__) +#if defined(__NetBSD__) || defined(__GNU__) #define STATVFS_F_FLAG(vfs) (vfs).f_flag #else #define STATVFS_F_FLAG(vfs) (vfs).f_flags @@ -111,7 +111,7 @@ namespace sys { namespace fs { #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ defined(__minix) || defined(__FreeBSD_kernel__) || defined(__linux__) || \ - defined(__CYGWIN__) || defined(__DragonFly__) || defined(_AIX) + defined(__CYGWIN__) || defined(__DragonFly__) || defined(_AIX) || defined(__GNU__) static int test_dir(char ret[PATH_MAX], const char *dir, const char *bin) { @@ -187,7 +187,7 @@ std::string getMainExecutable(const char *argv0, void *MainAddr) { if (getprogpath(exe_path, argv0) != NULL) return exe_path; -#elif defined(__linux__) || defined(__CYGWIN__) +#elif defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) char exe_path[MAXPATHLEN]; StringRef aPath("/proc/self/exe"); if (sys::fs::exists(aPath)) { @@ -360,7 +360,7 @@ std::error_code remove(const Twine &path, bool IgnoreNonExisting) { } static bool is_local_impl(struct STATVFS &Vfs) { -#if defined(__linux__) +#if defined(__linux__) || defined(__GNU__) #ifndef NFS_SUPER_MAGIC #define NFS_SUPER_MAGIC 0x6969 #endif @@ -370,7 +370,11 @@ static bool is_local_impl(struct STATVFS &Vfs) { #ifndef CIFS_MAGIC_NUMBER #define CIFS_MAGIC_NUMBER 0xFF534D42 #endif +#ifdef __GNU__ + switch ((uint32_t)Vfs.__f_type) { +#else switch ((uint32_t)Vfs.f_type) { +#endif case NFS_SUPER_MAGIC: case SMB_SUPER_MAGIC: case CIFS_MAGIC_NUMBER: