commit:     376fbe9ba6cedba285000bdb909a5ea46b0955e7
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 15 17:42:32 2021 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Feb 15 17:43:28 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=376fbe9b

net-analyzer/openbsd-netcat: update darwin patch so it applies to 1.195

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 .../files/openbsd-netcat-1.190-darwin.patch             | 17 +++++------------
 net-analyzer/openbsd-netcat/openbsd-netcat-1.195.ebuild |  4 ++--
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git 
a/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch 
b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch
index e1a462e746b..a8453c09067 100644
--- a/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch
+++ b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch
@@ -4,7 +4,7 @@ diff --git a/netcat.c b/netcat.c
 index a0fb51b..bbb5dd1 100644
 --- a/netcat.c
 +++ b/netcat.c
-@@ -51,11 +51,13 @@
+@@ -51,11 +51,16 @@
  # include <bsd/readpassphrase.h>
  #endif
  
@@ -18,6 +18,9 @@ index a0fb51b..bbb5dd1 100644
 -# define IPTOS_LOWCOST 0x02
  # define IPTOS_MINCOST IPTOS_LOWCOST
  #endif /* IPTOS_LOWDELAY */
++#ifndef SOCK_CLOEXEC
++# define SOCK_CLOEXEC 0
++#endif
  
 @@ -108,8 +110,9 @@
  # include <tls.h>
@@ -87,17 +90,7 @@ index a0fb51b..bbb5dd1 100644
                                        /* For now, all errnos are fatal */
                                        err(1, "accept");
                                }
-@@ -1092,14 +1091,16 @@
-       int s, save_errno;
- 
-       if (uflag) {
--              if ((s = unix_bind(unix_dg_tmp_socket, SOCK_CLOEXEC)) < 0)
-+              if ((s = unix_bind(unix_dg_tmp_socket, 0)) < 0)
-                       return -1;
-       } else {
--              if ((s = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)) < 0) {
-+              if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
-                       errx(1,"create unix socket failed");
+@@ -1100,6 +1099,8 @@
                        return -1;
                }
        }

diff --git a/net-analyzer/openbsd-netcat/openbsd-netcat-1.195.ebuild 
b/net-analyzer/openbsd-netcat/openbsd-netcat-1.195.ebuild
index 7994e7f7ba3..9e669ea4b2a 100644
--- a/net-analyzer/openbsd-netcat/openbsd-netcat-1.195.ebuild
+++ b/net-analyzer/openbsd-netcat/openbsd-netcat-1.195.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -30,7 +30,7 @@ src_prepare() {
        done
        if [[ ${CHOST} == *-darwin* ]] ; then
                # this undoes some of the Debian/Linux changes
-               eapply "${FILESDIR}"/${P}-darwin.patch
+               eapply "${FILESDIR}"/${PN}-1.190-darwin.patch
        fi
        default
 }

Reply via email to