Date: Wed, 11 Apr 2012 18:08:52 GMT From: Efren Yevale <syavne@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: i386/166853: [patch] security/prelude-pflogger compilation when net/libpcap is installed Message-ID: <201204111808.q3BI8qYk091950@red.freebsd.org> Resent-Message-ID: <201204111810.q3BIACd3007938@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 166853 >Category: i386 >Synopsis: [patch] security/prelude-pflogger compilation when net/libpcap is installed >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 11 18:10:12 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Efren Yevale >Release: 9.0 >Organization: Personal >Environment: FreeBSD dtimonitor 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:15:25 UTC 2012 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: Good day. It seems you are unable to compile prelude-pflogger when lippcap is installed in your system. Under this conditions the compilation fails due to the following: ===> Building for prelude-pflogger-0.9.0.r2_1 gmake all-recursive gmake[1]: Entering directory `/usr/ports/security/prelude-pflogger/work/prelude-pflogger-0.9.0-rc2' Making all in src gmake[2]: Entering directory `/usr/ports/security/prelude-pflogger/work/prelude-pflogger-0.9.0-rc2/src' Making all in include gmake[3]: Entering directory `/usr/ports/security/prelude-pflogger/work/prelude-pflogger-0.9.0-rc2/src/include' gmake[3]: Nothing to be done for `all'. gmake[3]: Leaving directory `/usr/ports/security/prelude-pflogger/work/prelude-pflogger-0.9.0-rc2/src/include' gmake[3]: Entering directory `/usr/ports/security/prelude-pflogger/work/prelude-pflogger-0.9.0-rc2/src' source='process_packet.c' object='process_packet.o' libtool=no \ depfile='.deps/process_packet.Po' tmpdepfile='.deps/process_packet.TPo' \ depmode=gcc3 /bin/sh ../depcomp \ cc -I../ -I./include/ -I/usr/local/include -I. -I. -I.. -O2 -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wbad-function-cast -Wcast-align -Wnested-externs -Wunused -c `test -f process_packet.c || echo './'`process_packet.c In file included from process_packet.c:49: /usr/include/net/bpf.h:65: error: redefinition of 'struct bpf_program' /usr/include/net/bpf.h:1050: error: redefinition of 'struct bpf_insn' gmake[3]: *** [process_packet.o] Error 1 gmake[3]: Leaving directory `/usr/ports/security/prelude-pflogger/work/prelude-pflogger-0.9.0-rc2/src' gmake[2]: *** [all-recursive] Error 1 gmake[2]: Leaving directory `/usr/ports/security/prelude-pflogger/work/prelude-pflogger-0.9.0-rc2/src' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/ports/security/prelude-pflogger/work/prelude-pflogger-0.9.0-rc2' gmake: *** [all] Error 2 *** Error code 1 Stop in /usr/ports/security/prelude-pflogger. >How-To-Repeat: Install libpcap: cd /usr/ports/net/libpcap make install clean And try to install the port: cd /usr/ports/security/prelude-pflogger make install clean >Fix: The patch provided for /usr/ports/security/prelude-pflogger/work/prelude-pflogger-0.9.0-rc2/src/process_packet.c changes the order in which the files net/bpf.h and pcap.h are included, the compilation succeeds after this with the command "make install clean". I'm not sure if this is the best way to solve the problem but prelude-pflogger is working without problems on my system. Patch attached with submission follows: --- process_packet.c.ori 2012-04-11 12:08:57.000000000 -0500 +++ process_packet.c 2012-04-11 12:05:26.000000000 -0500 @@ -43,10 +43,10 @@ #include <net/if_pflog.h> #include <net/pfvar.h> #include <netdb.h> +#include <net/bpf.h> #include <pcap.h> #include <sys/ioctl.h> #include <fcntl.h> -#include <net/bpf.h> #include <errno.h> #include <libprelude/prelude.h> >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204111808.q3BI8qYk091950>