Building a vanilla 2.43 dnsmasq on MacOS X 10.5 dies with this error: rfc1035.c: In function 'answer_request': rfc1035.c:1480: error: 'T_NAPTR' undeclared (first use in this function) rfc1035.c:1480: error: (Each undeclared identifier is reported only once rfc1035.c:1480: error: for each function it appears in.)
After screwing around with it I've got a patch that makes it build. --- src/config.h.old 2008-07-17 01:50:13.000000000 -0400 +++ src/config.h 2008-07-17 01:50:30.000000000 -0400 @@ -245,8 +245,6 @@ #define HAVE_SOCKADDR_SA_LEN /* Define before sys/socket.h is included so we get socklen_t */ #define _BSD_SOCKLEN_T_ -/* This is not defined in Mac OS X arpa/nameserv.h */ -#define IN6ADDRSZ 16 #elif defined(__NetBSD__) #define HAVE_BSD_NETWORK --- src/dnsmasq.h.old 2008-07-17 01:52:39.000000000 -0400 +++ src/dnsmasq.h 2008-07-17 01:53:58.000000000 -0400 @@ -33,10 +33,11 @@ #include <netinet/in.h> #ifdef __APPLE__ -/* need this before arpa/nameser.h */ -# define BIND_8_COMPAT +# include <nameser.h> +# include <arpa/nameser_compat.h> +#else +# include <arpa/nameser.h> #endif -#include <arpa/nameser.h> /* and this. */ #include <getopt.h>
