libresman
diff src/resman_impl.h @ 26:6b9974a8bdae
started BSD/mac support for file watching
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 31 Mar 2014 19:51:00 +0300 |
parents | ce04fa12afdd |
children |
line diff
1.1 --- a/src/resman_impl.h Thu Feb 13 21:34:41 2014 +0200 1.2 +++ b/src/resman_impl.h Mon Mar 31 19:51:00 2014 +0300 1.3 @@ -10,6 +10,9 @@ 1.4 #include <fcntl.h> 1.5 #include <sys/inotify.h> 1.6 #endif 1.7 +#if defined(__FreeBSD__) || defined(__APPLE__) 1.8 +#include <sys/event.h> 1.9 +#endif 1.10 #ifdef WIN32 1.11 #include <windows.h> 1.12 #endif 1.13 @@ -33,6 +36,9 @@ 1.14 #ifdef __linux__ 1.15 int nfd; 1.16 #endif 1.17 +#if defined(__FreeBSD__) || defined(__APPLE__) 1.18 + struct kevent kev; 1.19 +#endif 1.20 }; 1.21 1.22 1.23 @@ -56,6 +62,9 @@ 1.24 int inotify_fd; 1.25 struct rbtree *modset; 1.26 #endif 1.27 +#if defined(__FreeBSD__) || defined(__APPLE__) 1.28 + int kq; 1.29 +#endif 1.30 #ifdef WIN32 1.31 struct rbtree *watchdirs, *wdirbyev; 1.32 HANDLE *watch_handles; /* dynamic array of all the watched directory handles */