summaryrefslogtreecommitdiff
path: root/games/abuse/patches/patch-ah
blob: 7002c40765c1b2277a7bdce04a60139f92d63e26 (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
$NetBSD: patch-ah,v 1.2 2005/11/11 15:20:41 joerg Exp $

--- imlib/port/unix/jnet.c.orig	1996-05-24 20:48:19.000000000 +0000
+++ imlib/port/unix/jnet.c
@@ -30,6 +30,12 @@ extern "C" {
 #include "macs.hpp"
 #include "jmalloc.hpp"
 
+#if defined(__NetBSD__) || defined(__DragonFly__)
+#define SOCKLEN_TYPE	__socklen_t
+#else
+#define SOCKLEN_TYPE	int
+#endif
+
 int net_init(int protocol) 
 { 
   if (protocol==TCPIP_PROTOCOL)    // UNIX always has TCPIP!
@@ -146,7 +152,7 @@ out_socket *unix_in_socket::check_for_co
 
   if (FD_ISSET(fd,&set))
   {
-    int len=sizeof(sockaddr_in);
+    SOCKLEN_TYPE len=sizeof(sockaddr_in);
     int new_fd=accept(fd, (struct sockaddr *) &host, &len);
     if (new_fd<0)
     {