pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/p5-Net-Pcap Deal with libpcap on NetBSD



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b94a586790f4
branches:  trunk
changeset: 414652:b94a586790f4
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Mar 30 19:39:32 2020 +0000

description:
Deal with libpcap on NetBSD

diffstat:

 net/p5-Net-Pcap/distinfo                |   3 +-
 net/p5-Net-Pcap/patches/patch-stubs.inc |  34 +++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 1 deletions(-)

diffs (51 lines):

diff -r bcc71ab23aff -r b94a586790f4 net/p5-Net-Pcap/distinfo
--- a/net/p5-Net-Pcap/distinfo  Mon Mar 30 19:39:05 2020 +0000
+++ b/net/p5-Net-Pcap/distinfo  Mon Mar 30 19:39:32 2020 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.10 2016/08/01 12:34:11 mef Exp $
+$NetBSD: distinfo,v 1.11 2020/03/30 19:39:32 joerg Exp $
 
 SHA1 (Net-Pcap-0.18.tar.gz) = 9e53643cbe93e497af8c24cebe02bd7934194854
 RMD160 (Net-Pcap-0.18.tar.gz) = 1959ae0cc70fdd8b4cdb2d9028123fd83338c8d5
 SHA512 (Net-Pcap-0.18.tar.gz) = 63cc216345eb65b1e76efa657623c9d444d20f4b54ab0c75e787483baaa4f1de7e3a9294967aa7eccbdca04c60b089194dd7e0d19838f899b332c5881a8c7f6d
 Size (Net-Pcap-0.18.tar.gz) = 94207 bytes
 SHA1 (patch-Makefile.PL) = e8944761324b1a86323b96906953175f751bacac
+SHA1 (patch-stubs.inc) = 24cc81ee1a4d66d35349a85b01e181cfb1f478d0
diff -r bcc71ab23aff -r b94a586790f4 net/p5-Net-Pcap/patches/patch-stubs.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/p5-Net-Pcap/patches/patch-stubs.inc   Mon Mar 30 19:39:32 2020 +0000
@@ -0,0 +1,34 @@
+$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) {



Home | Main Index | Thread Index | Old Index