summaryrefslogtreecommitdiff
path: root/news/knews/patches/patch-ai
blob: dd50db50ba2c3f9d1d241bd5f92efa3ff7fa207c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$NetBSD: patch-ai,v 1.1 2001/02/23 22:19:42 tron Exp $

--- src/server.c.orig	Fri Jan  9 18:16:22 1998
+++ src/server.c	Fri Feb 23 22:41:48 2001
@@ -2,19 +2,21 @@
  *  Copyright (C) 1995, 1996  Karl-Johan Johnsson.
  */
 
+#include <sys/types.h>
+#include <sys/socket.h>
+
 #include "global.h"
 #include "child.h"
 #include "codes.h"
 #include "connect.h"
 #include "file.h"
 #include "resource.h"
+#include "sysdeps.h"
 #include "server.h"
 #include "util.h"
 #include "widgets.h"
 #include "xutil.h"
 
-#include "sysdeps.h"
-
 struct SERVER {
     int		fd;
     char	*buffer;
@@ -128,12 +130,12 @@
  *  tell != 0   means tell about errors
  *  tell >  1   means say what you're doing
  */
-int server_open(SERVER *server, struct SERV_ADDR *addr, int tell)
+int server_open(SERVER *server, SERV_ADDR *addr, int tell)
 {
     long	tmp;
 
     server_close(server);
-    server->fd = open_socket();
+    server->fd = open_socket(AF_INET);
     if (server->fd < 0) {
 	set_message("Error: Failed to create socket!", True);
 	return -1;