Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Commit

Permalink
[DirectoryWatcher] Fix cross-compilation.
Browse files Browse the repository at this point in the history
Some platforms have the header but don't have support for fs_event.
  • Loading branch information
Davide Italiano committed Oct 5, 2019
1 parent eeafed2 commit 62b8140
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/DirectoryWatcher/DirectoryWatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ struct DirectoryScan {
# define __has_include(x) 0
#endif

#if __has_include(<CoreServices/CoreServices.h>)
#if !defined(__is_target_os)
#define __is_target_os(x) 0
#endif

#if __is_target_os(macos)
# include "DirectoryWatcher-mac.inc.h"
#elif __has_include(<sys/inotify.h>)
# include "DirectoryWatcher-linux.inc.h"
Expand Down

0 comments on commit 62b8140

Please sign in to comment.