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>
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)
#cmakedefine HAVE_RES_NSEARCH 1
#cmakedefine HAVE___RES_NSEARCH 1
+#cmakedefine HAVE_NS_NAME_COMPRESS 1
+
/*************************** LIBRARIES ***************************/
#cmakedefine HAVE_LIBRESOLV 1
#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,