diff options
author | Jan Korous <jkorous@apple.com> | 2019-08-05 18:44:07 +0000 |
---|---|---|
committer | Jan Korous <jkorous@apple.com> | 2019-08-05 18:44:07 +0000 |
commit | 91efd86d9b0c9dbb6e1c864f8e34fb79ac802971 (patch) | |
tree | 0c603f6329ca7f13a155efbc323cdb4a768e821e /lib | |
parent | 4c0e6340651066cdf26a73624a864f85a82d2eac (diff) | |
download | clang-91efd86d9b0c9dbb6e1c864f8e34fb79ac802971.tar.gz |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367906 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp b/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp index 28af84e2f7..6998efbb5e 100644 --- a/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp +++ b/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 ); |