diff --git a/src/fs-poll.c b/src/fs-poll.c index 15f9b34e2..cf77bd53c 100644 --- a/src/fs-poll.c +++ b/src/fs-poll.c @@ -204,6 +204,17 @@ static int statbuf_eq(const uv__statbuf_t* a, const uv__statbuf_t* b) { if (a->st_ctimensec != b->st_ctimensec) return 0; if (a->st_mtimensec != b->st_mtimensec) return 0; # endif +# endif + + /* Jump through different hoops on OS X. */ +# if __APPLE__ +# if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) + if (a->st_ctimespec.tv_nsec != b->st_ctimespec.tv_nsec) return 0; + if (a->st_mtimespec.tv_nsec != b->st_mtimespec.tv_nsec) return 0; +# else + if (a->st_ctimensec != b->st_ctimensec) return 0; + if (a->st_mtimensec != b->st_mtimensec) return 0; +# endif # endif /* TODO(bnoordhuis) Other Unices have st_ctim and friends too, provided