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 d994392..9f55473 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