pkgsrc-Changes archive

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

CVS commit: pkgsrc/net/tcpexec



Module Name:    pkgsrc
Committed By:   tnn
Date:           Mon Apr 25 15:33:58 UTC 2022

Modified Files:
        pkgsrc/net/tcpexec: Makefile distinfo
        pkgsrc/net/tcpexec/patches: patch-tcpexec.c

Log Message:
tcpexec: fix build w/o SO_REUSEPORT


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/tcpexec/Makefile \
    pkgsrc/net/tcpexec/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/tcpexec/patches/patch-tcpexec.c

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

Modified files:

Index: pkgsrc/net/tcpexec/Makefile
diff -u pkgsrc/net/tcpexec/Makefile:1.1 pkgsrc/net/tcpexec/Makefile:1.2
--- pkgsrc/net/tcpexec/Makefile:1.1     Mon Nov 15 11:36:58 2021
+++ pkgsrc/net/tcpexec/Makefile Mon Apr 25 15:33:58 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2021/11/15 11:36:58 schmonz Exp $
+# $NetBSD: Makefile,v 1.2 2022/04/25 15:33:58 tnn Exp $
 
 GITHUB_PROJECT=                tcpexec
 GITHUB_TAG=            7e02e755aca4cb377910b729e43de8e3fb48eece
@@ -18,6 +18,8 @@ TEST_TARGET=          test    # XXX needs to be run
 
 INSTALLATION_DIRS=     bin share/doc/${PKGBASE}
 
+LDFLAGS.SunOS+=                -lsocket -lnsl
+
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/tcpexec ${DESTDIR}${PREFIX}/bin
        ${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
Index: pkgsrc/net/tcpexec/distinfo
diff -u pkgsrc/net/tcpexec/distinfo:1.1 pkgsrc/net/tcpexec/distinfo:1.2
--- pkgsrc/net/tcpexec/distinfo:1.1     Mon Nov 15 11:36:58 2021
+++ pkgsrc/net/tcpexec/distinfo Mon Apr 25 15:33:58 2022
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.1 2021/11/15 11:36:58 schmonz Exp $
+$NetBSD: distinfo,v 1.2 2022/04/25 15:33:58 tnn Exp $
 
 BLAKE2s (tcpexec/7e02e755aca4cb377910b729e43de8e3fb48eece-7e02e755aca4cb377910b729e43de8e3fb48eece.tar.gz) = 3e833e3aeb0a7bf8023ee870b1e5a1c39c10804037fbb6541470a018c646db0b
 SHA512 (tcpexec/7e02e755aca4cb377910b729e43de8e3fb48eece-7e02e755aca4cb377910b729e43de8e3fb48eece.tar.gz) = 
d1ad7ff52499a3287cadf4f44ce012a2bb9eeeaca2c77c75caa12fdcff2c09b60fefa396ebcb4dc3478acea1340e8ba322955ed9bb8f73af33a39254e545f801
 Size (tcpexec/7e02e755aca4cb377910b729e43de8e3fb48eece-7e02e755aca4cb377910b729e43de8e3fb48eece.tar.gz) = 4219 bytes
 SHA1 (patch-Makefile) = 17d61c1e7da32f51f528e282152f47601065c31b
-SHA1 (patch-tcpexec.c) = d87d6cde188efc84905348cac092de9488078741
+SHA1 (patch-tcpexec.c) = 79efc2368f688bb6edfa434f721dd37c8ad3be75

Index: pkgsrc/net/tcpexec/patches/patch-tcpexec.c
diff -u pkgsrc/net/tcpexec/patches/patch-tcpexec.c:1.1 pkgsrc/net/tcpexec/patches/patch-tcpexec.c:1.2
--- pkgsrc/net/tcpexec/patches/patch-tcpexec.c:1.1      Mon Nov 15 11:36:58 2021
+++ pkgsrc/net/tcpexec/patches/patch-tcpexec.c  Mon Apr 25 15:33:58 2022
@@ -1,6 +1,6 @@
-$NetBSD: patch-tcpexec.c,v 1.1 2021/11/15 11:36:58 schmonz Exp $
+$NetBSD: patch-tcpexec.c,v 1.2 2022/04/25 15:33:58 tnn Exp $
 
-Fix macOS build.
+Fix build without close-on-exec and/or SO_REUSEPORT.
 
 --- tcpexec.c.orig     2021-11-13 13:34:51.000000000 +0000
 +++ tcpexec.c
@@ -14,3 +14,14 @@ Fix macOS build.
      fd = socket(rp->ai_family, rp->ai_socktype | SOCK_CLOEXEC, rp->ai_protocol);
  
      if (fd == -1)
+@@ -160,8 +163,10 @@ static int tcpexec_listen(const char *ad
+     if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable)) == -1)
+       return -1;
+ 
++#ifdef SO_REUSEPORT
+     if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &enable, sizeof(enable)) == -1)
+       return -1;
++#endif
+ 
+     if (bind(fd, rp->ai_addr, rp->ai_addrlen) == -1)
+       return -1;



Home | Main Index | Thread Index | Old Index