diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-04-25 03:30:10 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-04-25 03:30:10 +0000 |
commit | 25e9d9025668dc638fcd171e43bbf9cd2895ea31 (patch) | |
tree | 8cd67a42e3d96f455272f278298be302efbabd16 /package/libpcap/patches/100-shared-lib.patch | |
parent | 8ce7b559d0f6533bcbe154f332855426d1d7a368 (diff) | |
download | upstream-25e9d9025668dc638fcd171e43bbf9cd2895ea31.tar.gz upstream-25e9d9025668dc638fcd171e43bbf9cd2895ea31.tar.bz2 upstream-25e9d9025668dc638fcd171e43bbf9cd2895ea31.zip |
pcap: update to version 1.0.0, add extension for changing the desired protocol for the internal raw socket (useful for reducing the cpu overhead of capture)
SVN-Revision: 15398
Diffstat (limited to 'package/libpcap/patches/100-shared-lib.patch')
-rw-r--r-- | package/libpcap/patches/100-shared-lib.patch | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/package/libpcap/patches/100-shared-lib.patch b/package/libpcap/patches/100-shared-lib.patch deleted file mode 100644 index aae77f8e72..0000000000 --- a/package/libpcap/patches/100-shared-lib.patch +++ /dev/null @@ -1,119 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -37,6 +37,15 @@ - srcdir = @srcdir@ - VPATH = @srcdir@ - -+# some defines for shared library compilation -+MAJ=0.9 -+MIN=8 -+VERSION=$(MAJ).$(MIN) -+LIBNAME=pcap -+LIBRARY=lib$(LIBNAME).a -+SOLIBRARY=lib$(LIBNAME).so -+SHAREDLIB=$(SOLIBRARY).$(VERSION) -+ - # - # You shouldn't need to edit anything below. - # -@@ -52,6 +61,7 @@ - - # Standard CFLAGS - CFLAGS = $(CCOPT) $(INCLS) $(DEFS) -+CFLAGS_SHARED = -shared -Wl,-soname,$(SOLIBRARY).$(MAJ) - - INSTALL = @INSTALL@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ -@@ -72,7 +82,12 @@ - .c.o: - @rm -f $@ - $(CC) $(CFLAGS) -c $(srcdir)/$*.c -+ $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c - -+%_pic.o: %.c -+ @rm -f $@ -+ $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c -+ - PSRC = pcap-@V_PCAP@.c - FSRC = fad-@V_FINDALLDEVS@.c - SSRC = @SSRC@ -@@ -86,6 +101,7 @@ - # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot - # hack the extra indirection - OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS) -+OBJ_PIC = $(PSRC:.c=_pic.o) $(FSRC:.c=_pic.o) $(CSRC:.c=_pic.o) $(SSRC:.c=_pic.o) $(GENSRC:.c=_pic.o) - HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \ - ethertype.h gencode.h gnuc.h - GENHDR = \ -@@ -97,15 +113,23 @@ - TAGFILES = \ - $(SRC) $(HDR) $(TAGHDR) - --CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c -+CLEANFILES = $(OBJ) $(OBJ_PIC) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so* - --all: libpcap.a -+all: libpcap.a $(SHAREDLIB) - - libpcap.a: $(OBJ) - @rm -f $@ - ar rc $@ $(OBJ) $(LIBS) - $(RANLIB) $@ - -+$(SHAREDLIB): $(OBJ_PIC) -+ -@rm -f $@ -+ -@rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ) -+ $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc -+ ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ) -+ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY) -+ -+ - shared: libpcap.$(DYEXT) - - # -@@ -131,6 +155,10 @@ - scanner.o: scanner.c tokdefs.h - $(CC) $(CFLAGS) -c scanner.c - -+scanner_pic.o: scanner.c tokdefs.h -+ $(CC) -fPIC $(CFLAGS) -o $@ -c scanner.c -+ -+ - pcap.o: version.h - - tokdefs.h: grammar.c -@@ -144,9 +172,16 @@ - @rm -f $@ - $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c - -+grammar_pic.o: grammar.c -+ @rm -f $@ -+ $(CC) -fPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c -+ - version.o: version.c - $(CC) $(CFLAGS) -c version.c - -+version_pic.o: version.c -+ $(CC) -fPIC $(CFLAGS) -c version.c -o $@ -+ - snprintf.o: $(srcdir)/missing/snprintf.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c - -@@ -172,10 +207,17 @@ - bpf_filter.o: bpf_filter.c - $(CC) $(CFLAGS) -c bpf_filter.c - -+bpf_filter_pic.o: bpf_filter.c -+ $(CC) -fPIC $(CFLAGS) -c bpf_filter.c -o $@ -+ -+ - install: libpcap.a - [ -d $(DESTDIR)$(libdir) ] || \ - (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) - $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a -+ $(INSTALL_DATA) $(SHAREDLIB) $(DESTDIR)$(libdir)/ -+ ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SOLIBRARY).$(MAJ) -+ ln -sf $(SOLIBRARY).$(MAJ) $(DESTDIR)$(libdir)/$(SOLIBRARY) - $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a - [ -d $(DESTDIR)$(includedir) ] || \ - (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir)) |