From f7b7019ae80a9aecfa0bdec1b1573c4d7ab66ff2 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 24 Nov 2019 20:58:03 +0000 Subject: [PATCH] Make library build on Mac OS X Signed-off-by: Michael Tremer --- configure.ac | 5 +++-- src/resolv.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 57c5b04..ead5dc9 100644 --- a/configure.ac +++ b/configure.ac @@ -62,7 +62,8 @@ AS_IF([test "x$enable_debug" = "xyes"], [ AC_CHECK_HEADERS_ONCE([ arpa/inet.h \ - arpa/nameser.h \ + arpa/nameser.h \ + arpa/nameser_compat.h \ endian.h \ netinet/in.h \ resolv.h \ @@ -149,7 +150,7 @@ AC_ARG_ENABLE(perl, AS_HELP_STRING([--disable-perl], [do not build the perl modu AM_CONDITIONAL(ENABLE_PERL, test "$enable_perl" = "yes") dnl Checking for libresolv -AC_CHECK_LIB(resolv, ns_msg_getflag, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([libresolv has not been found]), -lresolv) +AC_CHECK_LIB(resolv, res_init, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([libresolv has not been found]), -lresolv) RESOLV_LIBS="${LIBS}" AC_CONFIG_HEADERS(config.h) diff --git a/src/resolv.c b/src/resolv.c index 3ad0f27..51a2939 100644 --- a/src/resolv.c +++ b/src/resolv.c @@ -14,6 +14,8 @@ Lesser General Public License for more details. */ +#include +#include #include #include #include -- 2.47.3