Fix DragonFlyBSD build
authorDavid Carlier <devnexen@gmail.com>
Sat, 10 Nov 2018 01:01:03 +0000 (01:01 +0000)
committerDavid Carlier <devnexen@gmail.com>
Sat, 10 Nov 2018 01:01:03 +0000 (01:01 +0000)
Reviewers: rnk, thakis

Reviewed By: krytarowski

Differential Revision: https://reviews.llvm.org/D54363

llvm-svn: 346577

llvm/lib/Support/Unix/Path.inc

index 02b7c2579c9c5bf13fd55ac2933ca7f75471b09b..e36e389c92fef3ded601451f2513057d6cf7b1aa 100644 (file)
@@ -38,6 +38,8 @@
 #ifdef __APPLE__
 #include <mach-o/dyld.h>
 #include <sys/attr.h>
+#elif defined(__DragonFly__)
+#include <sys/mount.h>
 #endif
 
 // Both stdio.h and cstdio are included via different paths and
@@ -83,7 +85,7 @@
 #define STATVFS_F_FRSIZE(vfs) static_cast<uint64_t>(vfs.f_bsize)
 #endif
 
-#if defined(__NetBSD__) || defined(__GNU__)
+#if defined(__NetBSD__) || defined(__DragonFly__) || defined(__GNU__)
 #define STATVFS_F_FLAG(vfs) (vfs).f_flag
 #else
 #define STATVFS_F_FLAG(vfs) (vfs).f_flags