summaryrefslogtreecommitdiffstats
path: root/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
diff options
context:
space:
mode:
authorJan Korous <jkorous@apple.com>2019-08-05 18:44:07 +0000
committerJan Korous <jkorous@apple.com>2019-08-05 18:44:07 +0000
commit57f4bacf65ac3a32966e4b5029bc966038d2a754 (patch)
tree6606e12f1f31f536dfb220912ff149a5055318f7 /clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
parentd47b9438d7b73dd7f7bf5da723ff3426af6daf9a (diff)
downloadbcm5719-llvm-57f4bacf65ac3a32966e4b5029bc966038d2a754.tar.gz
bcm5719-llvm-57f4bacf65ac3a32966e4b5029bc966038d2a754.zip
[DirectoryWatcher][linux] Fix build for older kernels
Apparently kernel support for IN_EXCL_UNLINK in inotify_add_watch() doesn't imply it's defined in sys/inotify.h. https://bugs.llvm.org/show_bug.cgi?id=42824 llvm-svn: 367906
Diffstat (limited to 'clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp')
-rw-r--r--clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp b/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
index 28af84e2f70..6998efbb5e8 100644
--- a/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
+++ b/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
@@ -24,7 +24,6 @@
#include <vector>
#include <fcntl.h>
-#include <linux/version.h>
#include <sys/epoll.h>
#include <sys/inotify.h>
#include <unistd.h>
@@ -336,7 +335,7 @@ std::unique_ptr<DirectoryWatcher> clang::DirectoryWatcher::create(
InotifyFD, Path.str().c_str(),
IN_CREATE | IN_DELETE | IN_DELETE_SELF | IN_MODIFY |
IN_MOVED_FROM | IN_MOVE_SELF | IN_MOVED_TO | IN_ONLYDIR | IN_IGNORED
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
+#ifdef IN_EXCL_UNLINK
| IN_EXCL_UNLINK
#endif
);
OpenPOWER on IntegriCloud