Skip to content

Commit

Permalink
Don't redefine strlcpy on platforms which already have it, and add
Browse files Browse the repository at this point in the history
license.  Submitted by Thomas Merkel in #11.

Bump PKGREVISION for the LICENSE change.
  • Loading branch information
jperkin committed Aug 24, 2017
1 parent 4ae787c commit 970dd69
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
5 changes: 3 additions & 2 deletions net/hping/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# $NetBSD: Makefile,v 1.14 2013/10/21 09:05:09 fhajny Exp $
# $NetBSD: Makefile,v 1.15 2017/08/24 11:04:00 jperkin Exp $
#

DISTNAME= hping2.0.0-rc3
PKGNAME= hping-2.0.0.3
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= net
MASTER_SITES= http://www.hping.org/

MAINTAINER= [email protected]
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
Expand Down
3 changes: 2 additions & 1 deletion net/hping/distinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.9 2015/11/04 00:35:04 agc Exp $
$NetBSD: distinfo,v 1.10 2017/08/24 11:04:00 jperkin Exp $

SHA1 (hping2.0.0-rc3.tar.gz) = ec48293ca25e08155bf4b51ad6140b1be576a16f
RMD160 (hping2.0.0-rc3.tar.gz) = 345c6b29e48c2f9aea6b8bafb68c258f9ff8b083
Expand All @@ -20,3 +20,4 @@ SHA1 (patch-an) = f660b165d5564149a5b57fa7b84e305af1fefc51
SHA1 (patch-ao) = 52d30d71d91c33174de17dd1d0096c05e533504b
SHA1 (patch-ap) = 369b03242eb513ba73d75e7102e7aa5491a13e2e
SHA1 (patch-aq) = 548dd11def5085580ec118bb8ecff43df60a4140
SHA1 (patch-gethostname.c) = 74bda475731e0750813f555af58908bada13ba7d
17 changes: 17 additions & 0 deletions net/hping/patches/patch-gethostname.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
$NetBSD: patch-gethostname.c,v 1.1 2017/08/24 11:04:00 jperkin Exp $

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 <arpa/inet.h>
#include <string.h>

+#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)
{

0 comments on commit 970dd69

Please sign in to comment.