Author: jkorous Date: Mon Aug 5 11:44:07 2019 New Revision: 367906 URL: http://llvm.org/viewvc/llvm-project?rev=367906&view=rev Log: [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 Modified: cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp Modified: cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp?rev=367906&r1=367905&r2=367906&view=diff ============================================================================== --- cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp (original) +++ cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp Mon Aug 5 11:44:07 2019 @@ -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: 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 ); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits