pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/games/doomlegacy



Module Name:    pkgsrc
Committed By:   micha
Date:           Thu Jun 18 10:14:54 UTC 2020

Modified Files:
        pkgsrc/games/doomlegacy: Makefile distinfo
Added Files:
        pkgsrc/games/doomlegacy/patches: patch-src_i__tcp.c

Log Message:
games/doomlegacy: Build fix for SunOS

Use master server TCP patches for UDP too.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/games/doomlegacy/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/games/doomlegacy/distinfo
cvs rdiff -u -r0 -r1.3 pkgsrc/games/doomlegacy/patches/patch-src_i__tcp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/games/doomlegacy/Makefile
diff -u pkgsrc/games/doomlegacy/Makefile:1.7 pkgsrc/games/doomlegacy/Makefile:1.8
--- pkgsrc/games/doomlegacy/Makefile:1.7        Wed Jun 17 16:16:57 2020
+++ pkgsrc/games/doomlegacy/Makefile    Thu Jun 18 10:14:54 2020
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.7 2020/06/17 16:16:57 micha Exp $
+# $NetBSD: Makefile,v 1.8 2020/06/18 10:14:54 micha Exp $
 
 VERS=                  1.48.4
 PKGNAME=               doomlegacy-${VERS}
-PKGREVISION=           2
+PKGREVISION=           3
 CATEGORIES=            games
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=doomlegacy/}
 DISTNAME=              ${PKGNAME_NOREV:S/-/_/}_source

Index: pkgsrc/games/doomlegacy/distinfo
diff -u pkgsrc/games/doomlegacy/distinfo:1.6 pkgsrc/games/doomlegacy/distinfo:1.7
--- pkgsrc/games/doomlegacy/distinfo:1.6        Wed Jun 17 16:16:57 2020
+++ pkgsrc/games/doomlegacy/distinfo    Thu Jun 18 10:14:54 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2020/06/17 16:16:57 micha Exp $
+$NetBSD: distinfo,v 1.7 2020/06/18 10:14:54 micha Exp $
 
 SHA1 (doomlegacy_1.48.4_common.zip) = 14aed4c0091e8c61f46a2303f9316659ab6c0483
 RMD160 (doomlegacy_1.48.4_common.zip) = cca61af6bdda1003032ee117129e07596c8bbfcf
@@ -12,6 +12,7 @@ SHA1 (patch-src_Makefile) = 65a6380a5d11
 SHA1 (patch-src_am__map.c) = 647bcba2374cfa7038646e0c053636b43caaf33a
 SHA1 (patch-src_doomdata.h) = 2fd95b5db154b05ba88597b20c45146339db4622
 SHA1 (patch-src_dstrings.c) = e1fc8bdcb83efa18690d95c56e3ea7c94a388a50
+SHA1 (patch-src_i__tcp.c) = 13c8bd14cae31b078154f4ef0d2353cf089234b8
 SHA1 (patch-src_mserv.c) = 685ca5028740428ef2579025ca8673d8da526ebe
 SHA1 (patch-src_p__local.h) = e429f2ce5d60dd538bc5e796847b53ae72604b33
 SHA1 (patch-src_p__setup.c) = c3766f924b05655b8d9d17d4686dde9a83239e0a

Added files:

Index: pkgsrc/games/doomlegacy/patches/patch-src_i__tcp.c
diff -u /dev/null pkgsrc/games/doomlegacy/patches/patch-src_i__tcp.c:1.3
--- /dev/null   Thu Jun 18 10:14:54 2020
+++ pkgsrc/games/doomlegacy/patches/patch-src_i__tcp.c  Thu Jun 18 10:14:54 2020
@@ -0,0 +1,56 @@
+$NetBSD: patch-src_i__tcp.c,v 1.3 2020/06/18 10:14:54 micha Exp $
+
+Use native inet_aton() on Solaris.
+Use portable fcntl() instead of ioctl() for non-blocking mode by default.
+
+--- src/i_tcp.c.orig   2020-05-10 22:05:16.000000000 +0000
++++ src/i_tcp.c
+@@ -123,7 +123,7 @@
+ 
+ #ifdef __OS2__
+   // sys/types.h is also included unconditionally by doomincl.h
+-# include <sys/types.h>
++# include <sys/types.h>  // [MB] 2020-06-18: Maybe required for old Unix too
+ # include <sys/time.h>
+ #endif // __OS2__
+ 
+@@ -146,6 +146,7 @@
+ // non-windows includes
+ #include <sys/socket.h>
+ #include <netinet/in.h>
++#include <fcntl.h>       // [MB] 2020-06-18: For fcntl()
+ #include <unistd.h>
+ #include <netdb.h>
+ #include <sys/ioctl.h>
+@@ -355,7 +356,9 @@ byte  generic_hashaddr( mysockaddr_t *a 
+ // htons: host to net byte order
+ // ntohs: net to host byte order
+ 
+-#if defined( WIN32) || defined( __OS2__) || defined( SOLARIS)
++// [MB] 2020-06-18: Use native inet_aton() on Solaris
++// Solaris has inet_aton() in libresolv since version 2.6 from 1997
++#if defined( WIN32) || defined( __OS2__) // || defined( SOLARIS)
+ // [WDJ] Also defined in mserv.c, but too small, will be inlined anyway.
+ static inline
+ int inet_aton(const char *hostname,
+@@ -1006,7 +1009,20 @@ retry_bind:
+     CONS_Printf("Network port: %d\n", my_sock_port);
+ 
+     // make it non blocking
++#ifndef LINUX
+     ioctl (s, FIONBIO, &trueval);
++#else
++    // [MB] 2020-06-18: Use portable POSIX way to enable non-blocking mode
++    // https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
++    {
++        int res = fcntl(s, F_SETFL, O_NONBLOCK);
++        if(-1 == res)
++        {
++            I_SoftError("UDP_Socket: Switching to non-blocking mode failed: %s\n", strerror(errno));
++            goto close_socket;
++        }
++    }
++#endif
+ 
+     // make it broadcastable
+ #ifdef LINUX



Home | Main Index | Thread Index | Old Index