Ticket #158 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Old libpcap use D_IN instead of PCAP_D_IN

Reported by: zml Assigned to: lennart
Priority: minor Milestone: Avahi 0.6.22
Component: avahi-core Version:
Keywords: Cc:

Description

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 */

Change History

08/20/07 01:45:33 changed by lennart

  • status changed from new to closed.
  • resolution set to fixed.

(In [1523]) fix build on old freebsd, patch from zmi (Closes #158)

08/30/07 16:34:08 changed by lennart

  • milestone set to Avahi 0.6.22.