diff options
author | elfmz <fenix1905@tut.by> | 2021-09-08 00:49:58 +0300 |
---|---|---|
committer | elfmz <fenix1905@tut.by> | 2021-09-08 00:49:58 +0300 |
commit | e3acf2cb49dc66c207ae635c3e85247568e01225 (patch) | |
tree | 29b2a4ed5885d7bb421ab4ff39ac48e3b7309620 /utils | |
parent | 893c35f3d5b02fecf3b54b16857646c129b71fa5 (diff) |
fixing Mac&BSD builds
Diffstat (limited to 'utils')
-rw-r--r-- | utils/src/FSNotify.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/utils/src/FSNotify.cpp b/utils/src/FSNotify.cpp index da91630e..5faede96 100644 --- a/utils/src/FSNotify.cpp +++ b/utils/src/FSNotify.cpp @@ -1,10 +1,6 @@ #include <set> -#include <mutex> #include <vector> -#include <chrono> -#include <thread> #include <atomic> -#include <condition_variable> #if defined(__APPLE__) || defined(__FreeBSD__) # include <sys/types.h> # include <sys/event.h> @@ -53,11 +49,11 @@ class FSNotify : public IFSNotify #if defined(__APPLE__) || defined(__FreeBSD__) w = open(path, O_RDONLY | O_CLOEXEC); if (w != -1) { - u_int fflags = EV_ADD | EV_ENABLE | EV_ONESHOT | NOTE_DELETE | NOTE_LINK | NOTE_RENAME; + u_int fflags = NOTE_DELETE | NOTE_LINK | NOTE_RENAME; if (_what == FSNW_NAMES_AND_STATS) fflags|= NOTE_EXTEND | NOTE_WRITE | NOTE_ATTRIB; _events.emplace_back(); - EV_SET(&_events.back(), w, EVFILT_VNODE, fflags, 0, 0); + EV_SET(&_events.back(), w, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_ONESHOT, fflags, 0, 0); } #else uint32_t mask = IN_DELETE | IN_DELETE_SELF | IN_MOVE_SELF | IN_MOVED_FROM | IN_MOVED_TO | IN_CREATE; |