]> git.ipfire.org Git - location/libloc.git/commitdiff
Make library build on Mac OS X
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 24 Nov 2019 20:58:03 +0000 (20:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 24 Nov 2019 20:58:03 +0000 (20:58 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
configure.ac
src/resolv.c

index 57c5b0499c3f17131d0c2f84e37299188de35d47..ead5dc9ef810c9d9274572b66b38a5fc5d90a875 100644 (file)
@@ -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)
index 3ad0f27a17cdb4eec6e73abc26bda7e1c6924fa1..51a293950dd961bbfecb5544e99a4d8bdb0e265d 100644 (file)
@@ -14,6 +14,8 @@
        Lesser General Public License for more details.
 */
 
+#include <arpa/nameser.h>
+#include <arpa/nameser_compat.h>
 #include <resolv.h>
 #include <string.h>
 #include <time.h>