diff options
author | Hans Wennborg <hans@hanshq.net> | 2019-08-06 08:22:46 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2019-08-06 08:22:46 +0000 |
commit | 89e6b12344aa661622ab1325e2538c685b1d3a64 (patch) | |
tree | 161d62e6502a1c38d9259439a86945ab248fbb5d | |
parent | 44ca1f18c83a79593fb7072a91f01394d0e82fc7 (diff) |
Merging r367906:
------------------------------------------------------------------------
r367906 | jkorous | 2019-08-05 20:44:07 +0200 (Mon, 05 Aug 2019) | 5 lines
[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/branches/release_90@367995 91177308-0d34-0410-b5e6-96231b3b80d8
-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 6d7d69da4d..1a66faeb32 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> @@ -335,7 +334,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 ); |