From 91efd86d9b0c9dbb6e1c864f8e34fb79ac802971 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Mon, 5 Aug 2019 18:44:07 +0000 Subject: [PATCH] [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 --- lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp | 3 +-- 1 file changed, 1 insertion(+), 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 #include -#include #include #include #include @@ -336,7 +335,7 @@ std::unique_ptr 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 ); -- 2.40.0