Date: Sun, 29 Jan 2012 13:26:54 +0200 From: Andriy Gapon <avg@FreeBSD.org> To: FreeBSD Ports <ports@FreeBSD.org>, Martin Wilke <miwi@FreeBSD.org> Subject: net/vde2: freebsd10 and gcc 4.6 Message-ID: <4F252CFE.3000707@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
At least on FreeBSD 10 with gcc 4.6 as a ports compiler I need the following patch to compile net/vde2: --- src/vde_pcapplug.c.orig 2012-01-29 13:06:10.495087022 +0200 +++ src/vde_pcapplug.c 2012-01-29 13:11:03.344097090 +0200 @@ -32,7 +32,6 @@ #include <libgen.h> #define _GNU_SOURCE #include <getopt.h> -#include <pcap.h> #include <limits.h> #include <config.h> @@ -41,8 +40,9 @@ #include <libvdeplug.h> #ifdef VDE_FREEBSD -#include <sys/socket.h> +#include <net/bpf.h> #endif +#include <pcap.h> #if defined(VDE_DARWIN) || defined(VDE_FREEBSD) # if defined HAVE_SYSLIMITS_H Explanation: - without including net/bpf.h I get compiler errors for BIOCSHDRCMPLT, BIOCIMMEDIATE and BIOCFEEDBACK - we don't need sys/socket.h under VDE_FREEBSD, because it is already included unconditionally earlier in the file - pcap.h inclusion has to be after net/bpf.h, because otherwise pcap/bpf.h redefines some definitions from net/bpf.h P.S. my pcap.h comes from libpcap-1.2.1 -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F252CFE.3000707>