This is an archive of the discontinued LLVM Phabricator instance.

[DirectoryWatcher][linux] Fix build for older kernels
ClosedPublic

Authored by jkorous on Jul 15 2019, 11:25 AM.

Details

Summary

Mikael let me know that DirectoryWatcher broke build for older kernels because of IN_EXCL_UNLINK.

We have RHEL 6.10 buildbots with glibc 2.12.2 and kernel 2.6.32 where I see

  • Looking for include file sys/inotify.h
  • Looking for include file sys/inotify.h - found

but then get

/repo/uabelho/master/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp:335:48:
error: 'IN_EXCL_UNLINK' was not declared in this scope

IN_CREATE | IN_DELETE | IN_DELETE_SELF | IN_EXCL_UNLINK |

IN_MODIFY |

http://man7.org/linux/man-pages/man7/inotify.7.html

IN_EXCL_UNLINK (since Linux 2.6.36)

Diff Detail

Repository
rL LLVM

Event Timeline

jkorous created this revision.Jul 15 2019, 11:25 AM
gribozavr accepted this revision.Jul 15 2019, 4:07 PM
gribozavr added inline comments.
clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
322 ↗(On Diff #209919)

Group it with other includes?

This revision is now accepted and ready to land.Jul 15 2019, 4:07 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2019, 4:13 PM