net-analyzer/openbsd-netcat-1.195-r1: fix compile for real on >=darwin19

Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
This commit is contained in:
Fabian Groffen
2021-06-18 09:34:25 +02:00
parent 0e44e78131
commit d79073fa48
2 changed files with 7 additions and 3 deletions

View File

@@ -1,4 +1,8 @@
strtonum isn't available on <Darwin-10.15
strtonum isn't available on <Darwin-11
however, it is in the header files on systems like 10.15 with an
availability clause, so don't define strtonum static such that it
matches the prototype from stdlib.h
diff --git a/netcat.c b/netcat.c
index a0fb51b..bbb5dd1 100644
@@ -14,7 +18,7 @@ index a0fb51b..bbb5dd1 100644
+ "invalid"
+};
+
+static long long
+long long
+strtonum(
+ const char *nptr,
+ long long minval,

View File

@@ -31,7 +31,7 @@ src_prepare() {
if [[ ${CHOST} == *-darwin* ]] ; then
# this undoes some of the Debian/Linux changes
eapply "${FILESDIR}"/${PN}-1.195-darwin.patch
if [[ ${CHOST##*-darwin} -lt 19 ]] ; then
if [[ ${CHOST##*-darwin} -lt 20 ]] ; then
eapply "${FILESDIR}"/${PN}-1.190-darwin13.patch
fi
fi