$NetBSD$

--- netlogic/netplay.cpp.orig	1996-12-12 10:14:46.000000000 -0600
+++ netlogic/netplay.cpp
@@ -5,6 +5,7 @@
 #include "netplay.h"
 #include "protocol.h"
 
+#include <time.h>
 #ifdef _SGI_SOURCE
 #include <bstring.h>
 #endif
@@ -25,6 +26,10 @@
 #include <arpa/inet.h>
 #endif /* Win95 */
 
+#ifndef socklen_t
+#define	socklen_t unsigned int
+#endif
+
 int   gNumPlayers;
 int   gOurPlayer;
 int   gDeathMatch;
@@ -352,7 +357,8 @@ void QueueKey(unsigned char Op, unsigned
 int SyncNetwork(void)
 {
 	int  nleft;
-	int  i, clen, len;
+	int  i, len;
+	socklen_t clen;
 	struct sockaddr_in from;
 	unsigned long frame, seed, newseed;
 	struct timeval timeout;
@@ -567,7 +573,7 @@ inline void SuckPackets(void)
 	struct timeval timeout;
 	fd_set fdset;
 	char   netbuf[BUFSIZ];
-	int    clen;
+	socklen_t clen;
 	struct sockaddr_in from;
 	
 	timeout.tv_sec = 0;
@@ -807,7 +813,8 @@ int Send_NewGame(int *Wave, int *Lives, 
 	char message[BUFSIZ];
 	int  nleft, n;
 	int  acked[MAX_PLAYERS];
-	int  i, clen, len;
+	int  i, len;
+	socklen_t clen;
 	struct sockaddr_in from;
 	struct timeval timeout;
 	fd_set fdset;
@@ -939,7 +946,8 @@ getit:
 int Await_NewGame(int *Wave, int *Lives, int *Turbo)
 {
 	unsigned char netbuf[BUFSIZ];
-	int   i, clen, len, gameon;
+	int   i, len, gameon;
+	socklen_t clen;
 	struct sockaddr_in from;
 	fd_set fdset;
 	struct timeval timeout;
