pkgsrc/games/abuse/patches/patch-ah
joerg 260021a549 Add DragonFly to the systems with socklen_t. Remove an useless
make_block call which depends on the size of FILE.
2005-11-11 15:20:41 +00:00

26 lines
712 B
Text

$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)
{