Compiling Avahi on a FreeBSD-6.1-ish machine fails in the autoipd directory
with the following complaint:
main.c: In function `open_socket':
main.c:665: error: `PCAP_D_IN' undeclared (first use in this function)
main.c:665: error: (Each undeclared identifier is reported only once
main.c:665: error: for each function it appears in.)
main.c:687: warning: passing arg 3 of `pcap_compile' discards qualifiers from pointer target type
gmake[2]: *** [avahi_autoipd-main.o] Error 1
I used the following patch to get around it:
Index: avahi-autoipd/main.c
===================================================================
--- avahi-autoipd/main.c
+++ avahi-autoipd/main.c
@@ -77,6 +77,11 @@
#include "main.h"
#include "iface.h"
+/* Old versions of PCAP defined it as D_IN */
+#ifndef PCAP_D_IN
+#define PCAP_D_IN D_IN
+#endif
+
/* An implementation of RFC 3927 */
/* Constants from the RFC */