summaryrefslogtreecommitdiff
path: root/lib/resolv_wrapper
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2015-01-13 15:13:40 +0100
committerAndreas Schneider <asn@cryptomilk.org>2015-01-13 16:57:11 +0100
commit90de53f970a87fd4b6ade5e5f280cc58587b58ef (patch)
tree0f9e00be14b398b9377febc2d33e93b925e63dd1 /lib/resolv_wrapper
parentcee8ba1252e03bd6b92000f7b66a5cf9d1b66ca1 (diff)
downloadsamba-90de53f970a87fd4b6ade5e5f280cc58587b58ef.tar.gz
rwrap: Fix ns_name_compress detection.
On some platforms it is a macro and not a function. So we need to check if the macro exists. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'lib/resolv_wrapper')
-rw-r--r--lib/resolv_wrapper/wscript4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/resolv_wrapper/wscript b/lib/resolv_wrapper/wscript
index 797e90ad1d4..7d9e21ab17a 100644
--- a/lib/resolv_wrapper/wscript
+++ b/lib/resolv_wrapper/wscript
@@ -74,7 +74,9 @@ def configure(conf):
conf.CHECK_FUNCS_IN('res_search __res_search', 'resolv', checklibc=True)
conf.CHECK_FUNCS_IN('res_nsearch __res_nsearch', 'resolv', checklibc=True)
- conf.CHECK_FUNCS_IN('ns_name_compress', 'resolv', checklibc=True)
+ conf.CHECK_DECLS('ns_name_compress', headers='sys/types.h arpa/nameser.h')
+ if (conf.CONFIG_SET("HAVE_DECL_NS_NAME_COMPRESS")):
+ conf.DEFINE("HAVE_NS_NAME_COMPRESS", 1)
# Create full path to resolv_wrapper
srcdir = os.path.realpath(conf.srcdir)