ports/151263: [patch] Make net/arping compilable again

Lucius Windschuh lwindschuh at gmail.com
Wed Oct 6 14:10:02 UTC 2010


>Number:         151263
>Category:       ports
>Synopsis:       [patch] Make net/arping compilable again
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 06 14:10:02 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Lucius Windschuh
>Release:        9.0-CURRENT r213041
>Organization:
>Environment:
FreeBSD t400 9.0-CURRENT FreeBSD 9.0-CURRENT #5 r213041MP: Thu Sep 23 02:03:06 CEST 2010     root at t400:/usr/obj/usr/src/sys/CURRENT  i386
>Description:
On my machine, 9-CURRENT i386 with libpcap installed from the ports tree, arping fails to compile with:
In file included from arping.c:84:
/usr/include/net/bpf.h:65: error: redefinition of 'struct bpf_program'
/usr/include/net/bpf.h:89: error: redefinition of 'struct bpf_version'
/usr/include/net/bpf.h:913: error: redefinition of 'struct bpf_insn'

The cause is that net/bpf.h is included after pcap.h.
Strangely, pcap.h does not include net/bpf.h although it uses types from this file. It would definitely be a better solution to fix net/bpf.h and libpcap (as there are DLTs in libpcap's pcap-bpf.h that our net/bpf.h doesn't have), but this involves much more work.
>How-To-Repeat:
1. install libpcap from ports
2. try to compile net/arping on a 9-CURRENT system
>Fix:
Put the attached file into files/

Patch attached with submission follows:

--- src/arping.c	2010-04-01 18:48:36.000000000 +0200
+++ src/arping.c	2010-10-06 15:35:26.000000000 +0200
@@ -75,15 +75,15 @@
 #include <libnet.h>
 #endif
 
+#if HAVE_NET_BPF_H
+#include <net/bpf.h>
+#endif
+
 #if HAVE_WIN32_LIBNET_H
 #include <win32/libnet.h>
 #endif
 #include <pcap.h>
 
-#if HAVE_NET_BPF_H
-#include <net/bpf.h>
-#endif
-
 #ifndef ETH_ALEN
 #define ETH_ALEN 6
 #endif


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list