Renumber patch and correct flawed preprocessor code causing build failure.

Wed, 08 Aug 2012 20:27:30 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 08 Aug 2012 20:27:30 +0200
changeset 489
0348d09236d3
parent 488
0bcf858a6152
child 490
615d51fb3fea

Renumber patch and correct flawed preprocessor code causing build failure.

libpcap/libpcap.patch file | annotate | diff | comparison | revisions
libpcap/libpcap.spec file | annotate | diff | comparison | revisions
     1.1 --- a/libpcap/libpcap.patch	Wed Aug 08 20:24:57 2012 +0200
     1.2 +++ b/libpcap/libpcap.patch	Wed Aug 08 20:27:30 2012 +0200
     1.3 @@ -1,7 +1,7 @@
     1.4  Index: Makefile.in
     1.5  --- Makefile.in.orig	2010-03-12 02:56:53.000000000 +0100
     1.6  +++ Makefile.in	2010-03-31 09:50:02.000000000 +0200
     1.7 -@@ -324,7 +324,7 @@
     1.8 +@@ -345,7 +345,7 @@
     1.9   	Win32/Src/inet_net.c \
    1.10   	Win32/Src/inet_pton.c
    1.11   
    1.12 @@ -10,9 +10,9 @@
    1.13   
    1.14   libpcap.a: $(OBJ)
    1.15   	@rm -f $@
    1.16 -@@ -497,7 +497,7 @@
    1.17 - opentest: opentest.c libpcap.a
    1.18 - 	$(CC) $(CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c libpcap.a $(LIBS)
    1.19 +@@ -530,7 +530,7 @@
    1.20 + selpolltest: tests/selpolltest.c libpcap.a
    1.21 + 	$(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/tests/selpolltest.c libpcap.a $(LIBS)
    1.22   
    1.23  -install: install-shared install-archive pcap-config
    1.24  +install: install-archive pcap-config
    1.25 @@ -22,7 +22,7 @@
    1.26  Index: scanner.l
    1.27  --- scanner.l.orig	2010-03-12 02:56:54.000000000 +0100
    1.28  +++ scanner.l	2010-03-31 09:46:58.000000000 +0200
    1.29 -@@ -96,13 +96,6 @@
    1.30 +@@ -97,13 +97,6 @@
    1.31   B2		([0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f])
    1.32   W		([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?)
    1.33   
    1.34 @@ -36,3 +36,18 @@
    1.35   V680		{W}:{W}:{W}:{W}:{W}:{W}:{W}:{W}
    1.36   
    1.37   V670		::{W}:{W}:{W}:{W}:{W}:{W}:{W}
    1.38 +Index: Makefile.in
    1.39 +--- fad-getad.c.orig	2012-03-29 14:57:32.000000000 +0200
    1.40 ++++ fad-getad.c	2012-08-08 19:22:54.524951872 +0200
    1.41 +@@ -60,7 +60,10 @@
    1.42 + #include "os-proto.h"
    1.43 + #endif
    1.44 + 
    1.45 +-#ifdef AF_PACKET
    1.46 ++/* Yes Solaris 11 defines AF_PACKET but it does so in sys/socket.h */
    1.47 ++/* rather than netpacket/packet.h as claimed here. Not ready for   */
    1.48 ++/* prime time time so circumvent until corrected upstream.         */
    1.49 ++#ifdef AF_PACKET_KAPUTTIBUG
    1.50 + # ifdef HAVE_NETPACKET_PACKET_H
    1.51 + /* Solaris 11 and later, Linux distributions with newer glibc */
    1.52 + #  include <netpacket/packet.h>
     2.1 --- a/libpcap/libpcap.spec	Wed Aug 08 20:24:57 2012 +0200
     2.2 +++ b/libpcap/libpcap.spec	Wed Aug 08 20:27:30 2012 +0200
     2.3 @@ -36,14 +36,14 @@
     2.4  Group:        Capturing
     2.5  License:      GPL
     2.6  Version:      %{V_tarball}
     2.7 -Release:      20120613
     2.8 +Release:      20120800
     2.9  
    2.10  #   list of sources
    2.11  Source0:      http://www.tcpdump.org/release/libpcap-%{V_tarball}.tar.gz
    2.12  Patch0:       libpcap.patch
    2.13  
    2.14  #   build information
    2.15 -BuildPreReq:  OpenPKG, openpkg >= 20100101, bison, flex
    2.16 +BuildPreReq:  OpenPKG, openpkg >= 20100101, make, bison, flex
    2.17  PreReq:       OpenPKG, openpkg >= 20100101
    2.18  
    2.19  %description
    2.20 @@ -63,6 +63,9 @@
    2.21  %prep
    2.22      %setup -q -n libpcap-%{V_subdir}
    2.23      %patch -p0
    2.24 +    %{l_shtool} subst \
    2.25 +        -e 's;\(#if defined(PF_PACKET) && defined(SO_ATTACH_FILTER)\)$;\1 \&\& defined(__linux__);g' \
    2.26 +        gencode.c
    2.27  
    2.28  %build
    2.29      CC="%{l_cc}" \

mercurial