From c3007c61b9ba4f4ccad967c72d099f828dd548c3 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 6 Aug 2019 08:22:46 +0000 Subject: 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 ------------------------------------------------------------------------ llvm-svn: 367995 --- clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang') diff --git a/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp b/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp index 6d7d69d..1a66fae 100644 --- a/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp +++ b/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp @@ -24,7 +24,6 @@ #include #include -#include #include #include #include @@ -335,7 +334,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 ); -- cgit v1.1