net/vde2: freebsd10 and gcc 4.6

Andriy Gapon avg at
Sun Jan 29 11:44:25 UTC 2012

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>

-#include <sys/socket.h>
+#include <net/bpf.h>
+#include <pcap.h>

 #if defined(VDE_DARWIN) || defined(VDE_FREEBSD)
 #	if defined HAVE_SYSLIMITS_H

- without including net/bpf.h I get compiler errors for BIOCSHDRCMPLT,
- 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

More information about the freebsd-ports mailing list