OS X also matches HAVE_BSD_NETWORK, so the use of SIOCGIFAFLAG_IN6 causes build errors unless wrapped in !defined(__APPLE__). Patch available here: http://trac.macports.org/browser/trunk/dports/net/dnsmasq/files/patch-src-bfp.c.diff