]> git.meshlink.io Git - catta/commitdiff
compat fix for older inotify versions
authorLennart Poettering <lennart@poettering.net>
Wed, 9 May 2007 13:09:09 +0000 (13:09 +0000)
committerLennart Poettering <lennart@poettering.net>
Wed, 9 May 2007 13:09:09 +0000 (13:09 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1470 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-daemon/main.c

index d994392dd55073456bce4546063e9ff7f2c1f713..9f5547382daa5dcf010964939575735edc18f28d 100644 (file)
@@ -677,8 +677,16 @@ static void add_inotify_watches(void) {
     c = config.use_chroot;
 #endif
     
-    inotify_add_watch(inotify_fd, c ? "/services" : AVAHI_SERVICE_DIR, IN_CLOSE_WRITE|IN_DELETE|IN_DELETE_SELF|IN_MOVED_FROM|IN_MOVED_TO|IN_MOVE_SELF|IN_ONLYDIR);
-    inotify_add_watch(inotify_fd, c ? "/" : AVAHI_CONFIG_DIR, IN_CLOSE_WRITE|IN_DELETE|IN_DELETE_SELF|IN_MOVED_FROM|IN_MOVED_TO|IN_MOVE_SELF|IN_ONLYDIR);
+    inotify_add_watch(inotify_fd, c ? "/services" : AVAHI_SERVICE_DIR, IN_CLOSE_WRITE|IN_DELETE|IN_DELETE_SELF|IN_MOVED_FROM|IN_MOVED_TO|IN_MOVE_SELF
+#ifdef IN_ONLYDIR
+                      |IN_ONLYDIR
+#endif
+    );
+    inotify_add_watch(inotify_fd, c ? "/" : AVAHI_CONFIG_DIR, IN_CLOSE_WRITE|IN_DELETE|IN_DELETE_SELF|IN_MOVED_FROM|IN_MOVED_TO|IN_MOVE_SELF
+#ifdef IN_ONLYDIR
+                      |IN_ONLYDIR
+#endif
+    );
 }
 
 #endif