lm-resolver.c: limit conditional include to OS X
authorDavid H. Gutteridge <dhgutteridge@users.noreply.github.com>
Sat, 04 May 2019 16:03:51 +0000
changeset 733 3a3f9df8b9fd
parent 732 8588b5fd084a
child 734 866607b4c186
lm-resolver.c: limit conditional include to OS X Explicitly including arpa/nameser_compat.h is only necessary for OS X. It's unneeded on other OSes. Some, e.g. Linux and NetBSD, include nameser_compat.h from nameser.h anyway, so at minimum, it's redundant. In the case of NetBSD, this was causing build breakages on some architectures due to legacy code in nameser_compat.h being exposed before the inclusion of nameser.h, which sets dependent macros. committer: mcabber <lm@freakysoft.de>
loudmouth/lm-resolver.c
--- a/loudmouth/lm-resolver.c	Sat May 04 16:00:37 2019 +0000
+++ b/loudmouth/lm-resolver.c	Sat May 04 16:03:51 2019 +0000
@@ -21,7 +21,7 @@
 #include <string.h>
 
 /* Needed on Mac OS X */
-#if HAVE_ARPA_NAMESER_COMPAT_H
+#if defined(__APPLE__) && HAVE_ARPA_NAMESER_COMPAT_H
 #include <arpa/nameser_compat.h>
 #endif