# HG changeset patch # User Michael Schloh von Bennewitz # Date 1344450450 -7200 # Node ID 0348d09236d38a13473c05841f000993a38ea50c # Parent 0bcf858a6152374c58b75cbdf42b2b827c3e446e Renumber patch and correct flawed preprocessor code causing build failure. diff -r 0bcf858a6152 -r 0348d09236d3 libpcap/libpcap.patch --- a/libpcap/libpcap.patch Wed Aug 08 20:24:57 2012 +0200 +++ b/libpcap/libpcap.patch Wed Aug 08 20:27:30 2012 +0200 @@ -1,7 +1,7 @@ Index: Makefile.in --- Makefile.in.orig 2010-03-12 02:56:53.000000000 +0100 +++ Makefile.in 2010-03-31 09:50:02.000000000 +0200 -@@ -324,7 +324,7 @@ +@@ -345,7 +345,7 @@ Win32/Src/inet_net.c \ Win32/Src/inet_pton.c @@ -10,9 +10,9 @@ libpcap.a: $(OBJ) @rm -f $@ -@@ -497,7 +497,7 @@ - opentest: opentest.c libpcap.a - $(CC) $(CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c libpcap.a $(LIBS) +@@ -530,7 +530,7 @@ + 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: install-archive pcap-config @@ -22,7 +22,7 @@ Index: scanner.l --- scanner.l.orig 2010-03-12 02:56:54.000000000 +0100 +++ scanner.l 2010-03-31 09:46:58.000000000 +0200 -@@ -96,13 +96,6 @@ +@@ -97,13 +97,6 @@ B2 ([0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]) W ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?) @@ -36,3 +36,18 @@ V680 {W}:{W}:{W}:{W}:{W}:{W}:{W}:{W} V670 ::{W}:{W}:{W}:{W}:{W}:{W}:{W} +Index: Makefile.in +--- fad-getad.c.orig 2012-03-29 14:57:32.000000000 +0200 ++++ fad-getad.c 2012-08-08 19:22:54.524951872 +0200 +@@ -60,7 +60,10 @@ + #include "os-proto.h" + #endif + +-#ifdef AF_PACKET ++/* Yes Solaris 11 defines AF_PACKET but it does so in sys/socket.h */ ++/* rather than netpacket/packet.h as claimed here. Not ready for */ ++/* prime time time so circumvent until corrected upstream. */ ++#ifdef AF_PACKET_KAPUTTIBUG + # ifdef HAVE_NETPACKET_PACKET_H + /* Solaris 11 and later, Linux distributions with newer glibc */ + # include diff -r 0bcf858a6152 -r 0348d09236d3 libpcap/libpcap.spec --- a/libpcap/libpcap.spec Wed Aug 08 20:24:57 2012 +0200 +++ b/libpcap/libpcap.spec Wed Aug 08 20:27:30 2012 +0200 @@ -36,14 +36,14 @@ Group: Capturing License: GPL Version: %{V_tarball} -Release: 20120613 +Release: 20120800 # list of sources Source0: http://www.tcpdump.org/release/libpcap-%{V_tarball}.tar.gz Patch0: libpcap.patch # build information -BuildPreReq: OpenPKG, openpkg >= 20100101, bison, flex +BuildPreReq: OpenPKG, openpkg >= 20100101, make, bison, flex PreReq: OpenPKG, openpkg >= 20100101 %description @@ -63,6 +63,9 @@ %prep %setup -q -n libpcap-%{V_subdir} %patch -p0 + %{l_shtool} subst \ + -e 's;\(#if defined(PF_PACKET) && defined(SO_ATTACH_FILTER)\)$;\1 \&\& defined(__linux__);g' \ + gencode.c %build CC="%{l_cc}" \