file_watch: make sure sys/types.h is included first

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-11-11 21:59:25 +00:00
parent de3db23e23
commit 42cd5bca48
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 3 additions and 1 deletions

View File

@ -3,8 +3,10 @@
#ifdef HAS_INOTIFY #ifdef HAS_INOTIFY
#include <sys/inotify.h> #include <sys/inotify.h>
#elif HAS_KQUEUE #elif HAS_KQUEUE
#include <sys/event.h> // clang-format off
#include <sys/types.h> #include <sys/types.h>
// clang-format on
#include <sys/event.h>
#undef EV_ERROR // Avoid clashing with libev's EV_ERROR #undef EV_ERROR // Avoid clashing with libev's EV_ERROR
#include <fcntl.h> // For O_RDONLY #include <fcntl.h> // For O_RDONLY
#include <sys/time.h> // For struct timespec #include <sys/time.h> // For struct timespec