aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client_new.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client_new.c b/src/client_new.c
index beb8e14b7..781a36524 100644
--- a/src/client_new.c
+++ b/src/client_new.c
@@ -24,6 +24,12 @@
#include "permission.h"
#include <assert.h>
+#include <sys/types.h>
+#ifdef WIN32
+#include <winsock2.h>
+#else
+#include <sys/socket.h>
+#endif
#include <unistd.h>
#ifdef HAVE_LIBWRAP
@@ -111,7 +117,7 @@ void client_new(int fd, const struct sockaddr *sa, size_t sa_length, int uid)
client->send_buf_used = 0;
- (void)write(fd, GREETING, sizeof(GREETING) - 1);
+ (void)send(fd, GREETING, sizeof(GREETING) - 1, 0);
client_list_add(client);