#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 "usockfd.h"
return -1;
}
+#ifdef chmod
+#undef chmod
+#endif
if (chmod(usock_fn, mode) < 0) {
LOG(log_error, logtype_cnid, "error changing permissions for %s: %s",
usock_fn, strerror(errno));
socklen_t size;
fd_set readfds;
int ret;
- struct timeval tv;
FD_ZERO(&readfds);
FD_SET(sockfd, &readfds);
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;