Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hping2 build on Darwin and BSD #11

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion net/hping/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions net/hping/distinfo
Original file line number Diff line number Diff line change
Expand Up @@ -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
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$

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