Update libpcap to 1.3.0. Main pkgsrc change is support for Solaris 11/illumos.

Summary for 1.3.0 libpcap release
        Handle DLT_PFSYNC in {FreeBSD, other *BSD+Mac OS X, other}.
        Linux: Don't fail if netfilter isn't enabled in the kernel.
        Add new link-layer type for NFC Forum LLCP.
        Put the CANUSB stuff into EXTRA_DIST, so it shows up in the release tarball.
        Add LINKTYPE_NG40/DLT_NG40.
        Add DLT_MPEG_2_TS/LINKTYPE_MPEG_2_TS for MPEG-2 transport streams.
        [PATCH] Fix AIX-3.5 crash with read failure during stress
        AIX fixes.
        Introduce --disable-shared configure option.
        Added initial support for canusb devices.
        Include the pcap(3PCAP) additions as 1.2.1 changes.
        many updates to documentation: pcap.3pcap.in
        Improve 'inbound'/'outbound' capture filters under Linux.
        Note the cleanup of handling of new DLT_/LINKTYPE_ values.
        On Lion, don't build for PPC.
        For mac80211 devices we need to clean up monitor mode on exit.

Summary for 1.2.1 libpcap release
        Update README file.
        Fix typoes in README.linux file.
        Clean up some compiler warnings.
        Fix Linux compile problems and tests for ethtool.h.
        Treat Debian/kFreeBSD and GNU/Hurd as systems with GNU
         toolchains.
        Support 802.1 QinQ as a form of VLAN in filters.
        Treat "carp" as equivalent to "vrrp" in filters.
        Fix code generated for "ip6 protochain".
        Add some new link-layer header types.
        Support capturing NetFilter log messages on Linux.
        Clean up some error messages.
        Turn off monitor mode on exit for mac80211 interfaces on Linux.
        Fix problems turning monitor mode on for non-mac80211 interfaces
         on Linux.
        Properly fail if /sys/class/net or /proc/net/dev exist but can't
         be opened.
        Fail if pcap_activate() is called on an already-activated
         pcap_t, and add a test program for that.
        Fix filtering in pcap-ng files.
        Don't build for PowerPC on Mac OS X Lion.
        Simplify handling of new DLT_/LINKTYPE_ values.
        Expand pcap(3PCAP) man page.

Summary for 1.2 libpcap release
        All of the changes listed below for 1.1.1 and 1.1.2.
        Changes to error handling for pcap_findalldevs().
        Fix the calculation of the frame size in memory-mapped captures.
        Add a link-layer header type for STANAG 5066 D_PDUs.
        Add a link-layer type for a variant of 3GPP TS 27.010.
        Noted real nature of LINKTYPE_ARCNET.
        Add a link-layer type for DVB-CI.
        Fix configure-script discovery of VLAN acceleration support.
         see http://netoptimizer.blogspot.com/2010/09/tcpdump-vs-vlan-tags.html
        Linux, HP-UX, AIX, NetBSD and OpenBSD compilation/conflict fixes.
        Protect against including AIX 5.x's <net/bpf.h> having been included.
        Add DLT_DBUS, for raw D-Bus messages.
        Treat either EPERM or EACCES as "no soup for you".
        Changes to permissions on DLPI systems.
        Add DLT_IEEE802_15_4_NOFCS for 802.15.4 interfaces.
This commit is contained in:
jperkin 2013-02-06 18:07:04 +00:00
parent 994aadf229
commit e36f11811f
9 changed files with 208 additions and 78 deletions

View file

@ -1,7 +1,6 @@
# $NetBSD: Makefile,v 1.50 2012/10/23 17:18:34 asau Exp $
# $NetBSD: Makefile,v 1.51 2013/02/06 18:07:04 jperkin Exp $
DISTNAME= libpcap-1.1.1
PKGREVISION= 1
DISTNAME= libpcap-1.3.0
SVR4_PKGNAME= lpcap
CATEGORIES= net
MASTER_SITES= http://www.tcpdump.org/release/
@ -14,27 +13,16 @@ LICENSE= modified-bsd
NOT_FOR_PLATFORM+= Interix-*-* # no raw interface access
PKG_INSTALLATION_TYPES= overwrite pkgviews
INSTALLATION_DIRS= bin
USE_LIBTOOL= yes
USE_TOOLS+= bison gm4 lex
GNU_CONFIGURE= yes
PLIST_VARS+= SunOS std
.include "../../mk/bsd.prefs.mk"
.if exists(/usr/include/netinet/ip6.h)
CONFIGURE_ARGS+= --enable-ipv6
.endif
.if ${OPSYS} == "SunOS"
.if ${OS_VERSION} != "5.11"
CONFIGURE_ARGS+= --with-pcap=dlpi
.endif
PLIST.SunOS= yes
.else
PLIST.std= yes
.endif
post-install:
${INSTALL_DATA} ${WRKSRC}/pcap-int.h ${DESTDIR}${PREFIX}/include

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.9 2011/02/11 12:11:26 adam Exp $
@comment $NetBSD: PLIST,v 1.10 2013/02/06 18:07:04 jperkin Exp $
bin/pcap-config
include/pcap-bpf.h
include/pcap-int.h
@ -38,6 +38,7 @@ man/man3/pcap_fileno.3
man/man3/pcap_findalldevs.3
man/man3/pcap_fopen_offline.3
man/man3/pcap_free_datalinks.3
man/man3/pcap_free_tstamp_types.3
man/man3/pcap_freealldevs.3
man/man3/pcap_freecode.3
man/man3/pcap_get_selectable_fd.3
@ -47,6 +48,7 @@ man/man3/pcap_inject.3
man/man3/pcap_is_swapped.3
man/man3/pcap_lib_version.3
man/man3/pcap_list_datalinks.3
man/man3/pcap_list_tstamp_types.3
man/man3/pcap_lookupdev.3
man/man3/pcap_lookupnet.3
man/man3/pcap_loop.3
@ -66,6 +68,7 @@ man/man3/pcap_set_promisc.3
man/man3/pcap_set_rfmon.3
man/man3/pcap_set_snaplen.3
man/man3/pcap_set_timeout.3
man/man3/pcap_set_tstamp_type.3
man/man3/pcap_setdirection.3
man/man3/pcap_setfilter.3
man/man3/pcap_setnonblock.3
@ -73,9 +76,9 @@ man/man3/pcap_snapshot.3
man/man3/pcap_stats.3
man/man3/pcap_statustostr.3
man/man3/pcap_strerror.3
${PLIST.std}man/man5/pcap-savefile.5
${PLIST.std}man/man7/pcap-filter.7
${PLIST.std}man/man7/pcap-linktype.7
${PLIST.SunOS}man/man4/pcap-savefile.4
${PLIST.SunOS}man/man5/pcap-filter.5
${PLIST.SunOS}man/man5/pcap-linktype.5
man/man3/pcap_tstamp_type_name_to_val.3
man/man3/pcap_tstamp_type_val_to_name.3
man/man5/pcap-savefile.5
man/man7/pcap-tstamp.7
man/man7/pcap-filter.7
man/man7/pcap-linktype.7

View file

@ -1,8 +1,10 @@
$NetBSD: distinfo,v 1.26 2012/06/27 10:53:39 fhajny Exp $
$NetBSD: distinfo,v 1.27 2013/02/06 18:07:04 jperkin Exp $
SHA1 (libpcap-1.1.1.tar.gz) = 18581af5e78a40b7b2c9a6cd8ce40e7cb1cd9c63
RMD160 (libpcap-1.1.1.tar.gz) = 760159c594cc995c9e05c0cd8637a02a3b2725e2
Size (libpcap-1.1.1.tar.gz) = 581984 bytes
SHA1 (patch-aa) = 2a797ffee404d1cfd38e7d739796e47c514ec5c3
SHA1 (patch-ac) = 755a3fd5d11a71ed71cebeffb209d4c7f2b91a18
SHA1 (patch-ad) = 7f13de40a6cdaf9db68704979948450265ff961a
SHA1 (libpcap-1.3.0.tar.gz) = 90aa2f0fcfb4bf79fc50ccdaa70f484d96295be3
RMD160 (libpcap-1.3.0.tar.gz) = 3d80cd06c89b32bee1f344bfe720624c2c35763f
Size (libpcap-1.3.0.tar.gz) = 608967 bytes
SHA1 (patch-ac) = 859fc7f91a2831030a3b685ef6448a0c26065b3e
SHA1 (patch-ad) = 3eb306bbd997f83b55d08cdda1573cf2fdef54f1
SHA1 (patch-configure) = 25c1bb8f7ec0b493d3a37bb0d9454519312da3e4
SHA1 (patch-gencode.c) = d232d89924ae59ac23b224a5d9b40b0677757656
SHA1 (patch-pcap-libdlpi.c) = 5626ed40845ca3b96b6a599547f64b11a8f89f81

View file

@ -1,17 +0,0 @@
$NetBSD: patch-aa,v 1.7 2011/02/11 12:11:26 adam Exp $
--- pcap/pcap.h.orig 2008-10-29 15:08:55.000000000 +0100
+++ pcap/pcap.h
@@ -349,10 +349,12 @@ void pcap_freealldevs(pcap_if_t *);
const char *pcap_lib_version(void);
/* XXX this guy lives in the bpf tree */
+#ifndef _NET_BPF_H_
u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
int bpf_validate(const struct bpf_insn *f, int len);
char *bpf_image(const struct bpf_insn *, int);
void bpf_dump(const struct bpf_program *, int);
+#endif
#if defined(WIN32)

View file

@ -1,6 +1,6 @@
$NetBSD: patch-ac,v 1.7 2012/06/27 10:53:40 fhajny Exp $
$NetBSD: patch-ac,v 1.8 2013/02/06 18:07:04 jperkin Exp $
--- Makefile.in.orig 2010-04-05 17:54:05.000000000 +0000
--- Makefile.in.orig 2012-03-29 12:57:32.000000000 +0000
+++ Makefile.in
@@ -45,7 +45,7 @@ VPATH = @srcdir@
#
@ -8,10 +8,10 @@ $NetBSD: patch-ac,v 1.7 2012/06/27 10:53:40 fhajny Exp $
LD = /usr/bin/ld
-CC = @CC@
+CC = ${LIBTOOL} --mode=compile @CC@
AR = @AR@
CCOPT = @V_CCOPT@
INCLS = -I. @V_INCLS@
DEFS = @DEFS@ @V_DEFS@
@@ -76,7 +76,8 @@ YACC = @V_YACC@
@@ -78,7 +78,8 @@ YACC = @V_YACC@
# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
# Also, gcc does not remove the .o before forking 'as', which can be a
# problem if you don't own the file but can write to the directory.
@ -19,9 +19,9 @@ $NetBSD: patch-ac,v 1.7 2012/06/27 10:53:40 fhajny Exp $
+.SUFFIXES: .lo
+.c.lo:
@rm -f $@
$(CC) $(CFLAGS) -c $(srcdir)/$*.c
$(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
@@ -87,13 +88,13 @@ CSRC = pcap.c inet.c gencode.c optimize.
@@ -89,13 +90,13 @@ CSRC = pcap.c inet.c gencode.c optimize.
savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \
bpf_image.c bpf_dump.c
GENSRC = scanner.c grammar.c bpf_filter.c version.c
@ -37,7 +37,7 @@ $NetBSD: patch-ac,v 1.7 2012/06/27 10:53:40 fhajny Exp $
PUBHDR = \
pcap.h \
pcap-bpf.h \
@@ -324,12 +325,10 @@ EXTRA_DIST = \
@@ -345,12 +346,10 @@ EXTRA_DIST = \
Win32/Src/inet_net.c \
Win32/Src/inet_pton.c
@ -46,49 +46,49 @@ $NetBSD: patch-ac,v 1.7 2012/06/27 10:53:40 fhajny Exp $
-libpcap.a: $(OBJ)
- @rm -f $@
- ar rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
- $(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
- $(RANLIB) $@
+libpcap.la: $(OBJ)
+ ${LIBTOOL} --mode=link @CC@ -rpath ${PREFIX}/lib ${LDFLAGS} $(OBJ) $(LIBS) -o libpcap.la
shared: libpcap.$(DYEXT)
@@ -413,10 +412,10 @@ scanner.c: $(srcdir)/scanner.l
@@ -434,10 +433,10 @@ scanner.c: $(srcdir)/scanner.l
@rm -f $@
$(srcdir)/runlex.sh $(LEX) -o$@ $<
-scanner.o: scanner.c tokdefs.h
+scanner.lo: scanner.c tokdefs.h
$(CC) $(CFLAGS) -c scanner.c
$(CC) $(FULL_CFLAGS) -c scanner.c
-pcap.o: version.h
+pcap.lo: version.h
tokdefs.h: grammar.c
grammar.c: $(srcdir)/grammar.y
@@ -425,17 +424,17 @@ grammar.c: $(srcdir)/grammar.y
@@ -446,17 +445,17 @@ grammar.c: $(srcdir)/grammar.y
mv y.tab.c grammar.c
mv y.tab.h tokdefs.h
-grammar.o: grammar.c
+grammar.lo: grammar.c
@rm -f $@
$(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
$(CC) $(FULL_CFLAGS) -Dyylval=pcap_lval -c grammar.c
-version.o: version.c
+version.lo: version.c
$(CC) $(CFLAGS) -c version.c
$(CC) $(FULL_CFLAGS) -c version.c
-snprintf.o: $(srcdir)/missing/snprintf.c
+snprintf.lo: $(srcdir)/missing/snprintf.c
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
-version.c: $(srcdir)/VERSION
+version.c: #$(srcdir)/VERSION
@rm -f $@
if grep GIT ${srcdir}/VERSION >/dev/null; then \
read ver <${srcdir}/VERSION; \
@@ -452,7 +451,7 @@ version.c: $(srcdir)/VERSION
@@ -473,7 +472,7 @@ version.c: $(srcdir)/VERSION
# so we make the version string static and return it from
# a function, which does work.
#
@ -97,25 +97,25 @@ $NetBSD: patch-ac,v 1.7 2012/06/27 10:53:40 fhajny Exp $
@rm -f $@
if grep GIT ${srcdir}/VERSION >/dev/null; then \
read ver <${srcdir}/VERSION; \
@@ -466,7 +465,7 @@ bpf_filter.c: $(srcdir)/bpf/net/bpf_filt
@@ -487,7 +486,7 @@ bpf_filter.c: $(srcdir)/bpf/net/bpf_filt
rm -f bpf_filter.c
ln -s $(srcdir)/bpf/net/bpf_filter.c bpf_filter.c
-bpf_filter.o: bpf_filter.c
+bpf_filter.lo: bpf_filter.c
$(CC) $(CFLAGS) -c bpf_filter.c
$(CC) $(FULL_CFLAGS) -c bpf_filter.c
#
@@ -497,7 +496,7 @@ selpolltest: selpolltest.c libpcap.a
opentest: opentest.c libpcap.a
$(CC) $(CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c libpcap.a $(LIBS)
@@ -530,7 +529,7 @@ opentest: tests/opentest.c libpcap.a
selpolltest: tests/selpolltest.c libpcap.a
$(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/tests/selpolltest.c libpcap.a $(LIBS)
-install: install-shared install-archive pcap-config
+install: libpcap.la pcap-config
[ -d $(DESTDIR)$(libdir) ] || \
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
[ -d $(DESTDIR)$(includedir) ] || \
@@ -512,48 +511,49 @@ install: install-shared install-archive
@@ -545,57 +544,58 @@ install: install-shared install-archive
(mkdir -p $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@)
[ -d $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@ ] || \
(mkdir -p $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@)
@ -126,7 +126,7 @@ $NetBSD: patch-ac,v 1.7 2012/06/27 10:53:40 fhajny Exp $
[ -d $(DESTDIR)$(bindir) ] || \
(mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
- $(INSTALL_PROGRAM) pcap-config $(DESTDIR)$(bindir)/pcap-config
+ ${BSD_INSTALL_SCRIPT} pcap-config $(DESTDIR)$(bindir)/pcap-config
+ $(BSD_INSTALL_SCRIPT) pcap-config $(DESTDIR)$(bindir)/pcap-config
for i in $(MAN1); do \
$(INSTALL_DATA) $(srcdir)/$$i \
$(DESTDIR)$(mandir)/man1/$$i; done
@ -146,12 +146,21 @@ $NetBSD: patch-ac,v 1.7 2012/06/27 10:53:40 fhajny Exp $
- rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_findalldevs.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_list_datalinks.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_list_tstamp_types.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
@ -173,12 +182,21 @@ $NetBSD: patch-ac,v 1.7 2012/06/27 10:53:40 fhajny Exp $
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3
+ ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3 \
+ $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3
+ ln $(DESTDIR)$(mandir)/man3/pcap_findalldevs.3 \
+ $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3
+ ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3 \
+ $(DESTDIR)$(mandir)/man3/pcap_perror.3
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3
+ ln $(DESTDIR)$(mandir)/man3/pcap_inject.3 \
+ $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3
+ ln $(DESTDIR)$(mandir)/man3/pcap_list_datalinks.3 \
+ $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3
+ ln $(DESTDIR)$(mandir)/man3/pcap_list_tstamp_types.3 \
+ $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3
+ ln $(DESTDIR)$(mandir)/man3/pcap_loop.3 \
+ $(DESTDIR)$(mandir)/man3/pcap_dispatch.3

View file

@ -1,13 +1,32 @@
$NetBSD: patch-ad,v 1.5 2011/09/14 17:30:04 hans Exp $
$NetBSD: patch-ad,v 1.6 2013/02/06 18:07:04 jperkin Exp $
--- fad-getad.c.orig 2010-04-05 19:54:05.000000000 +0200
+++ fad-getad.c 2011-07-28 20:28:17.246289360 +0200
@@ -60,7 +60,7 @@ static const char rcsid[] _U_ =
#include "os-proto.h"
#endif
* Re-order includes to avoid bpf_program re-definition.
--- fad-getad.c.orig 2012-03-29 12:57:32.000000000 +0000
+++ fad-getad.c
@@ -54,12 +54,6 @@ static const char rcsid[] _U_ =
#include <string.h>
#include <ifaddrs.h>
-#ifdef AF_PACKET
+#if defined(AF_PACKET) && !defined(__sun)
# ifdef __Lynx__
/* LynxOS */
# include <netpacket/if_packet.h>
-#include "pcap-int.h"
-
-#ifdef HAVE_OS_PROTO_H
-#include "os-proto.h"
-#endif
-
#ifdef AF_PACKET
# ifdef HAVE_NETPACKET_PACKET_H
/* Solaris 11 and later, Linux distributions with newer glibc */
@@ -77,6 +71,12 @@ static const char rcsid[] _U_ =
# endif /* HAVE_NETPACKET_PACKET_H */
#endif /* AF_PACKET */
+#include "pcap-int.h"
+
+#ifdef HAVE_OS_PROTO_H
+#include "os-proto.h"
+#endif
+
/*
* This is fun.
*

View file

@ -0,0 +1,75 @@
$NetBSD: patch-configure,v 1.1 2013/02/06 18:07:04 jperkin Exp $
* Fix sys/bufmod.h and linking issues on Solaris.
* Use standard manpage layout on all platforms.
--- configure.orig 2012-03-29 12:57:32.000000000 +0000
+++ configure
@@ -5225,6 +5225,20 @@ dlpi)
# Also, due to the bug above applications that link to libpcap with
# libdlpi will have to add "-L/lib" option to "configure".
#
+ for ac_header in sys/bufmod.h sys/dlpi_ext.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+ SSRC="dlpisubs.c"
+
saved_ldflags=$LDFLAGS
LDFLAGS="$LIBS -L/lib"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
@@ -5763,19 +5777,6 @@ else
case "$V_PCAP" in
dlpi|libdlpi)
- for ac_header in sys/bufmod.h sys/dlpi_ext.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
#
# This might be Solaris 8 or later, with
# SIOCGLIFCONF, or it might be some other OS
@@ -5820,7 +5821,6 @@ $as_echo "$ac_cv_lbl_have_siocglifconf"
#
# Needed for common functions used by pcap-[dlpi,libdlpi].c
#
- SSRC="dlpisubs.c"
;;
*)
@@ -6688,8 +6688,6 @@ fi
# Individual cases can override this.
#
DYEXT="none"
-MAN_FILE_FORMATS=5
-MAN_MISC_INFO=7
case "$host_os" in
aix*)
@@ -6916,6 +6914,9 @@ $as_echo "#define HAVE_SOLARIS 1" >>conf
;;
esac
+MAN_FILE_FORMATS=5
+MAN_MISC_INFO=7
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2

View file

@ -0,0 +1,24 @@
$NetBSD: patch-gencode.c,v 1.1 2013/02/06 18:07:04 jperkin Exp $
* Correctly limit Linux interfaces to Linux-only.
--- gencode.c.orig 2012-06-12 16:55:36.000000000 +0000
+++ gencode.c
@@ -84,7 +84,7 @@ static const char rcsid[] _U_ =
#include "pcap/sll.h"
#include "pcap/ipnet.h"
#include "arcnet.h"
-#if defined(PF_PACKET) && defined(SO_ATTACH_FILTER)
+#if defined(linux) && defined(PF_PACKET) && defined(SO_ATTACH_FILTER)
#include <linux/types.h>
#include <linux/if_packet.h>
#include <linux/filter.h>
@@ -7583,7 +7583,7 @@ gen_inbound(dir)
* check it, otherwise give up as this link-layer type
* has nothing in the packet data.
*/
-#if defined(PF_PACKET) && defined(SO_ATTACH_FILTER)
+#if defined(linux) && defined(PF_PACKET) && defined(SO_ATTACH_FILTER)
/*
* We infer that this is Linux with PF_PACKET support.
* If this is a *live* capture, we can look at

View file

@ -0,0 +1,18 @@
$NetBSD: patch-pcap-libdlpi.c,v 1.1 2013/02/06 18:07:04 jperkin Exp $
* Fix compile on Solaris.
--- pcap-libdlpi.c.orig 2012-03-29 12:57:32.000000000 +0000
+++ pcap-libdlpi.c
@@ -235,9 +235,9 @@ bad:
static int
dlpromiscon(pcap_t *p, bpf_u_int32 level)
{
- int err;
+ int err, retv;
- retv = dlpi_promiscon(p->hd, level);
+ retv = dlpi_promiscon(p->dlpi_hd, level);
if (retv != DLPI_SUCCESS) {
if (retv == DL_SYSERR &&
(errno == EPERM || errno == EACCES))