#include <sys/stat.h>
#endif /* HAVE_SYS_STAT_H */
#include <netinet/in.h>
+#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <setjmp.h>
#include <time.h>
#include "uid.h"
#endif /* FORCE_UIDGID */
+#ifndef SOL_TCP
+#define SOL_TCP IPPROTO_TCP
+#endif
+
/*
* We generally pass this from afp_over_dsi to all afp_* funcs, so it should already be
* available everywhere. Unfortunately some funcs (eg acltoownermode) need acces to it
}
}
+ /* set TCP_NODELAY */
+ int flag = 1;
+ setsockopt(dsi->socket, SOL_TCP, TCP_NODELAY, &flag, sizeof(flag));
+
/* get stuck here until the end */
while (1) {
if (sigsetjmp(recon_jmp, 1) != 0)
#include "config.h"
#endif /* HAVE_CONFIG_H */
-#define USE_TCP_NODELAY
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
setsockopt(dsi->serversock, IPPROTO_IPV6, IPV6_BINDV6ONLY, (char *)&on, sizeof (on));
#endif
-#ifdef USE_TCP_NODELAY
#ifndef SOL_TCP
#define SOL_TCP IPPROTO_TCP
#endif
flag = 1;
setsockopt(dsi->serversock, SOL_TCP, TCP_NODELAY, &flag, sizeof(flag));
-#endif /* USE_TCP_NODELAY */
if (bind(dsi->serversock, p->ai_addr, p->ai_addrlen) == -1) {
close(dsi->serversock);