]> arthur.barton.de Git - netatalk.git/blobdiff - etc/cnid_dbd/usockfd.c
Merge remote branch 'sf/branch-allea' into branch-allea
[netatalk.git] / etc / cnid_dbd / usockfd.c
index d9dadb5b9828a879d447897a4acf8e8e060a177a..c2e625f6d3b1813862496c32bfcece9303ee5de9 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif /* HAVE_UNISTD_H */
 #include <sys/un.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
-
-#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
-#endif /* HAVE_SYS_TYPES_H */
-#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#endif /* HAVE_SYS_TIME_H */
-
 
 #include <atalk/logger.h>
+#include <atalk/compat.h>
 #include "usockfd.h"
 
 #include <sys/select.h>
@@ -155,7 +148,6 @@ int usockfd_check(int sockfd, const sigset_t *sigset)
     socklen_t size;
     fd_set readfds;
     int ret;
-    struct timeval tv;
      
     FD_ZERO(&readfds);
     FD_SET(sockfd, &readfds);
@@ -177,10 +169,6 @@ int usockfd_check(int sockfd, const sigset_t *sigset)
                 strerror(errno));
             return -1;
         }
-        if (setnonblock(fd, 1) != 0) {
-            LOG(log_error, logtype_cnid, "setnonblock: %s", strerror(errno));
-            return -1;
-        }
         return fd;
     } else
         return 0;