From owner-freebsd-ports Sun Jan 30 2:52:59 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 433E91556F for ; Sun, 30 Jan 2000 02:52:55 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id CAA71671; Sun, 30 Jan 2000 02:50:04 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Sun, 30 Jan 2000 02:50:04 -0800 (PST) Message-Id: <200001301050.CAA71671@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: Alexander Langer Subject: Re: ports/16444: fix games/maelstrom (bentofied) Reply-To: Alexander Langer Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR ports/16444; it has been noted by GNATS. From: Alexander Langer To: Ade Lovett Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: ports/16444: fix games/maelstrom (bentofied) Date: Sun, 30 Jan 2000 11:13:56 +0100 Thus spake Ade Lovett (ade@lovett.com): > socklen_t is only present in 4.x. Please be a little more thoughtful > of the patches you're supplying. Hmm. I'm sorry, but I didn't know that it is int * in -stable. In fact, I've read so much code with socklen_t, that I thought it is the standard :-P (Steven's books as a small example) Try this as patch-ad then please. --- netlogic/netplay.cpp.orig Thu Dec 12 17:14:46 1996 +++ netlogic/netplay.cpp Sun Jan 30 11:08:49 2000 @@ -24,6 +24,7 @@ #include #include #endif /* Win95 */ +#include int gNumPlayers; int gOurPlayer; @@ -431,8 +432,13 @@ /* We are guaranteed that there is data here */ readit: clen = sizeof(from); +#if (__FreeBSD_version < 400000) len = recvfrom(gNetFD, (char *)buf, BUFSIZ, 0, (struct sockaddr *)&from, &clen); +#else + len = recvfrom(gNetFD, (char *)buf, BUFSIZ, 0, + (struct sockaddr *)&from, (socklen_t *) &clen); +#endif if ( len <= 0 ) { if ( errno == EINTR ) { errno = 0; @@ -585,8 +591,13 @@ /* Suck up the packet */ clen = sizeof(from); +#if (__FreeBSD_version < 400000) (void) recvfrom(gNetFD, netbuf, BUFSIZ, 0, (struct sockaddr *)&from, &clen); +#else + (void) recvfrom(gNetFD, netbuf, BUFSIZ, 0, + (struct sockaddr *)&from, (socklen_t *) &clen); +#endif } } @@ -887,8 +898,13 @@ /* We are guaranteed that there is data here */ clen = sizeof(from); +#if (__FreeBSD_version < 400000) len = recvfrom(gNetFD, (char *)netbuf, BUFSIZ, 0, (struct sockaddr *)&from, &clen); +#else + len = recvfrom(gNetFD, (char *)netbuf, BUFSIZ, 0, + (struct sockaddr *)&from, (socklen_t *) &clen); +#endif if ( len <= 0 ) { perror("Network error in Send_NewGame(): recvfrom()"); return(-1); @@ -991,8 +1007,13 @@ /* We are guaranteed that there is data here */ clen = sizeof(from); +#if (__FreeBSD_version < 400000) len = recvfrom(gNetFD, (char *)netbuf, BUFSIZ, 0, (struct sockaddr *)&from, &clen); +#else + len = recvfrom(gNetFD, (char *)netbuf, BUFSIZ, 0, + (struct sockaddr *)&from, (socklen_t *) &clen); +#endif if ( len < 0 ) { perror("Network error in Await_NewGame(): recvfrom()"); return(-1); Alex -- I doubt, therefore I might be. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message