From 3d72e1d3df8c7e55feaac3fdf32b9aa587f5d060 Mon Sep 17 00:00:00 2001 From: Thomas Merkel Date: Wed, 23 Aug 2017 21:05:36 +0200 Subject: [PATCH] Fix hping2 build on Darwin and BSD strlcpy already defined in Darwin (Apple) and *BSDs. Added LICENSE information. --- net/hping/Makefile | 3 ++- net/hping/distinfo | 1 + net/hping/patches/patch-gethostname.c | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 net/hping/patches/patch-gethostname.c diff --git a/net/hping/Makefile b/net/hping/Makefile index 0fdff77f2006..05e70bd455ab 100644 --- a/net/hping/Makefile +++ b/net/hping/Makefile @@ -3,13 +3,14 @@ DISTNAME= hping2.0.0-rc3 PKGNAME= hping-2.0.0.3 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= net MASTER_SITES= http://www.hping.org/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://www.hping.org/ COMMENT= Command-line oriented TCP/IP packet assembler/analyzer +LICENSE= gnu-gpl-v2 WRKSRC= ${WRKDIR}/hping2-rc3 HAS_CONFIGURE= YES diff --git a/net/hping/distinfo b/net/hping/distinfo index 7a3635f351c4..331809b0a08b 100644 --- a/net/hping/distinfo +++ b/net/hping/distinfo @@ -20,3 +20,4 @@ SHA1 (patch-an) = f660b165d5564149a5b57fa7b84e305af1fefc51 SHA1 (patch-ao) = 52d30d71d91c33174de17dd1d0096c05e533504b SHA1 (patch-ap) = 369b03242eb513ba73d75e7102e7aa5491a13e2e SHA1 (patch-aq) = 548dd11def5085580ec118bb8ecff43df60a4140 +SHA1 (patch-gethostname.c) = 272b42e29119fb078eb228d65677bd6cc17729f7 diff --git a/net/hping/patches/patch-gethostname.c b/net/hping/patches/patch-gethostname.c new file mode 100644 index 000000000000..02e0a69e1d4f --- /dev/null +++ b/net/hping/patches/patch-gethostname.c @@ -0,0 +1,17 @@ +$NetBSD$ + +strlcpy already exists on *BSD and Darwin + +--- gethostname.c.orig 2002-03-28 15:54:48.000000000 +0000 ++++ gethostname.c +@@ -16,7 +16,10 @@ + #include + #include + ++#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && \ ++ !defined(__bsdi__) && !defined(__APPLE__) + size_t strlcpy(char *dst, const char *src, size_t siz); ++#endif + + char *get_hostname(char* addr) + {