Make the new libasyncns compile on mac os x
authorMikael Hallendal <micke@imendio.com>
Sun, 26 Oct 2008 01:56:11 +0200
changeset 550 104d37c1b24a
parent 549 99a387fdb1bb
child 551 db742abb3630
Make the new libasyncns compile on mac os x
loudmouth/asyncns.c
--- a/loudmouth/asyncns.c	Sun Oct 26 01:52:23 2008 +0200
+++ b/loudmouth/asyncns.c	Sun Oct 26 01:56:11 2008 +0200
@@ -41,6 +41,12 @@
 #include <resolv.h>
 #include <dirent.h>
 
+/* Needed on Mac OS X where it is not included from arpa/nameser.h */
+#if HAVE_ARPA_NAMESER_COMPAT_H
+#include <arpa/nameser_compat.h>
+#endif
+
+
 #ifdef HAVE_SYS_PRCTL_H
 #include <sys/prctl.h>
 #endif
@@ -197,7 +203,6 @@
 static int close_allv(const int except_fds[]) {
     struct rlimit rl;
     int fd;
-    int saved_errno;
 
 #ifdef __linux__
 
@@ -289,7 +294,7 @@
     int sig;
     assert(except);
 
-    for (sig = 1; sig < _NSIG; sig++) {
+    for (sig = 1; sig < NSIG; sig++) {
         int reset = 1;
 
         switch (sig) {