#include "config.h"
#endif /* HAVE_CONFIG_H */
-#if !defined(__FreeBSD__) && !defined(__NetBSD__)
-# ifndef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 600
-# endif
-# ifndef __EXTENSIONS__
-# define __EXTENSIONS__
-# endif
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-# endif
-#endif
+#include <atalk/standards.h>
+
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
-#include <arpa/inet.h>
+#include <sys/uio.h>
#include <netinet/in.h>
+#include <arpa/inet.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
end.tv_sec += timeout;
while (stored < length) {
- len = read(socket, (char *) data + stored, length - stored);
+ len = recv(socket, (char *) data + stored, length - stored, 0);
if (len == -1) {
switch (errno) {
case EINTR:
while ((ret = select(socket + 1, &rfds, NULL, NULL, &tv)) < 1) {
switch (ret) {
case 0:
- LOG(log_debug, logtype_afpd, "select timeout %d s", timeout);
+ LOG(log_debug, logtype_dsi, "select timeout %d s", timeout);
errno = EAGAIN;
goto exit;