Mon Mar 30 19:39:32 2020 UTC ()
Deal with libpcap on NetBSD
(joerg)
diff -r1.10 -r1.11 pkgsrc/net/p5-Net-Pcap/distinfo
diff -r0 -r1.1 pkgsrc/net/p5-Net-Pcap/patches/patch-stubs.inc
--- pkgsrc/net/p5-Net-Pcap/distinfo 2016/08/01 12:34:11 1.10
+++ pkgsrc/net/p5-Net-Pcap/distinfo 2020/03/30 19:39:32 1.11
| @@ -1,7 +1,8 @@ | | | @@ -1,7 +1,8 @@ |
1 | $NetBSD: distinfo,v 1.10 2016/08/01 12:34:11 mef Exp $ | | 1 | $NetBSD: distinfo,v 1.11 2020/03/30 19:39:32 joerg Exp $ |
2 | | | 2 | |
3 | SHA1 (Net-Pcap-0.18.tar.gz) = 9e53643cbe93e497af8c24cebe02bd7934194854 | | 3 | SHA1 (Net-Pcap-0.18.tar.gz) = 9e53643cbe93e497af8c24cebe02bd7934194854 |
4 | RMD160 (Net-Pcap-0.18.tar.gz) = 1959ae0cc70fdd8b4cdb2d9028123fd83338c8d5 | | 4 | RMD160 (Net-Pcap-0.18.tar.gz) = 1959ae0cc70fdd8b4cdb2d9028123fd83338c8d5 |
5 | SHA512 (Net-Pcap-0.18.tar.gz) = 63cc216345eb65b1e76efa657623c9d444d20f4b54ab0c75e787483baaa4f1de7e3a9294967aa7eccbdca04c60b089194dd7e0d19838f899b332c5881a8c7f6d | | 5 | SHA512 (Net-Pcap-0.18.tar.gz) = 63cc216345eb65b1e76efa657623c9d444d20f4b54ab0c75e787483baaa4f1de7e3a9294967aa7eccbdca04c60b089194dd7e0d19838f899b332c5881a8c7f6d |
6 | Size (Net-Pcap-0.18.tar.gz) = 94207 bytes | | 6 | Size (Net-Pcap-0.18.tar.gz) = 94207 bytes |
7 | SHA1 (patch-Makefile.PL) = e8944761324b1a86323b96906953175f751bacac | | 7 | SHA1 (patch-Makefile.PL) = e8944761324b1a86323b96906953175f751bacac |
| | | 8 | SHA1 (patch-stubs.inc) = 24cc81ee1a4d66d35349a85b01e181cfb1f478d0 |
$NetBSD: patch-stubs.inc,v 1.1 2020/03/30 19:39:32 joerg Exp $
pcap_open no longer exists in NetBSD, so don't redefine pcap_rmtauth.
pcap_setsampling still has a prototype, but no implementation.
--- stubs.inc.orig 2020-03-29 03:00:42.548466448 +0000
+++ stubs.inc
@@ -354,11 +354,13 @@ int pcap_parsesrcstr(const char *source,
#ifdef _MSC_VER
#pragma message( "Warning: the function pcap_open() is not available" )
#endif
+#ifndef HAVE_PCAP_OPEN_DEAD
struct pcap_rmtauth {
int type;
char *username;
char *password;
};
+#endif
pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err);
pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err) {
@@ -516,10 +518,12 @@ HANDLE pcap_getevent(pcap_t *p) {
#ifdef _MSC_VER
#pragma message( "Warning: the function pcap_setsampling() is not available" )
#endif
+#ifndef PCAP_SAMP_NOSAMP
struct pcap_samp {
int method;
int value;
};
+#endif
struct pcap_samp *pcap_setsampling(pcap_t *p);
struct pcap_samp *pcap_setsampling(pcap_t *p) {