]> git.meshlink.io Git - catta/blobdiff - avahi-common/simple-watch.c
fix fedora init script exit code (closes #115) patch from mbacovsk@redhat.com
[catta] / avahi-common / simple-watch.c
index 2a15c5effba9bf26a597052bf6039fb5dc7f7375..65d9d18919ce46c6f0ceb009135d75ee6ea97ab1 100644 (file)
@@ -31,9 +31,9 @@
 #include <fcntl.h>
 #include <stdio.h>
 
-#include <avahi-common/llist.h>
-#include <avahi-common/malloc.h>
-
+#include "llist.h"
+#include "malloc.h"
+#include "timeval.h"
 #include "simple-watch.h"
 
 struct AvahiWatch {
@@ -619,7 +619,7 @@ const AvahiPoll* avahi_simple_poll_get(AvahiSimplePoll *s) {
     return &s->api;
 }
 
-static int system_poll(struct pollfd *ufds, unsigned int nfds, int timeout, void *userdata) {
+static int system_poll(struct pollfd *ufds, unsigned int nfds, int timeout, AVAHI_GCC_UNUSED void *userdata) {
     return poll(ufds, nfds, timeout);
 }
 
@@ -640,5 +640,6 @@ int avahi_simple_poll_loop(AvahiSimplePoll *s) {
     
     for (;;)
         if ((r = avahi_simple_poll_iterate(s, -1)) != 0)
-            return r;
+            if (r >= 0 || errno != EINTR)
+                return r;
 }