rwrap: If we do not have ns_name_compress() use dn_comp().
authorAndreas Schneider <asn@samba.org>
Thu, 8 Jan 2015 15:32:19 +0000 (16:32 +0100)
committerAndreas Schneider <asn@samba.org>
Mon, 12 Jan 2015 16:27:00 +0000 (17:27 +0100)
This should fix older Linux versions which do not export
ns_name_compress(). In newer glibc versions dn_comp() calls
ns_name_compress().

Reviewed-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
ConfigureChecks.cmake
config.h.cmake
src/resolv_wrapper.c

index 41bed3a1f9051a0e48e222de061ed89636cfee0f..a68959f87de62e70e91deb5754b5810cb1d2c980 100644 (file)
@@ -94,6 +94,8 @@ check_function_exists(__res_search HAVE___RES_SEARCH)
 check_function_exists(res_nsearch HAVE_RES_NSEARCH)
 check_function_exists(__res_nsearch HAVE___RES_NSEARCH)
 
+check_function_exists(ns_name_compress HAVE_NS_NAME_COMPRESS)
+
 if (UNIX)
     if (NOT LINUX)
         # libsocket (Solaris)
index aad83e3a57c40737f3551336b2a468010f5d3b9c..31e2855ef172db355789be1b284cc6349471eb6c 100644 (file)
@@ -44,6 +44,8 @@
 #cmakedefine HAVE_RES_NSEARCH 1
 #cmakedefine HAVE___RES_NSEARCH 1
 
+#cmakedefine HAVE_NS_NAME_COMPRESS 1
+
 /*************************** LIBRARIES ***************************/
 
 #cmakedefine HAVE_LIBRESOLV 1
index 7211ad087a4bcb286a4cc162aee465d53748e849..c70ca64e92b7737e3cd5b972cd719fdb1352d20c 100644 (file)
 #define RWRAP_DEFAULT_FAKE_TTL 600
 #endif  /* RWRAP_DEFAULT_FAKE_TTL */
 
+#ifndef HAVE_NS_NAME_COMPRESS
+#define ns_name_compress dn_comp
+#endif
+
 enum rwrap_dbglvl_e {
        RWRAP_LOG_ERROR = 0,
        RWRAP_LOG_WARN,