[llvm-branch-commits] [cfe-branch] r367995 - Merging r367906:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Aug 6 01:22:47 PDT 2019


Author: hans
Date: Tue Aug  6 01:22:46 2019
New Revision: 367995

URL: http://llvm.org/viewvc/llvm-project?rev=367995&view=rev
Log:
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
------------------------------------------------------------------------

Modified:
    cfe/branches/release_90/   (props changed)
    cfe/branches/release_90/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp

Propchange: cfe/branches/release_90/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug  6 01:22:46 2019
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:366429,366448,366457,366474,366480,366483,366511,366670,366694,366699,366878,367008,367039,367055,367103,367134,367301,367305,367323,367387,367520,367530,367661,367675,367823
+/cfe/trunk:366429,366448,366457,366474,366480,366483,366511,366670,366694,366699,366878,367008,367039,367055,367103,367134,367301,367305,367323,367387,367520,367530,367661,367675,367823,367906
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_90/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_90/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp?rev=367995&r1=367994&r2=367995&view=diff
==============================================================================
--- cfe/branches/release_90/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp (original)
+++ cfe/branches/release_90/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp Tue Aug  6 01:22:46 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>
@@ -335,7 +334,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
       );




More information about the llvm-branch-commits mailing list