summaryrefslogtreecommitdiff
path: root/lib/doh.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-10-16 23:35:44 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-10-18 14:51:49 +0200
commitad547fcf7b3c0191f63396b94c797bfbb4147f62 (patch)
tree539d2f4855a9f9b9d46d8a43a98450faa16bf8bf /lib/doh.c
parent6b6ba1dc29857f5eb4c31fed3d63619fea99d5f4 (diff)
downloadcurl-ad547fcf7b3c0191f63396b94c797bfbb4147f62.tar.gz
travis: add build for "configure --disable-verbose"
Closes #3144
Diffstat (limited to 'lib/doh.c')
-rw-r--r--lib/doh.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/doh.c b/lib/doh.c
index 019ac789c..ef6013db9 100644
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -41,6 +41,7 @@
#define DNS_CLASS_IN 0x01
#define DOH_MAX_RESPONSE_SIZE 3000 /* bytes */
+#ifndef CURL_DISABLE_VERBOSE_STRINGS
static const char * const errors[]={
"",
"Bad label",
@@ -63,6 +64,7 @@ static const char *doh_strerror(DOHcode code)
return errors[code];
return "bad error code";
}
+#endif
#ifdef DEBUGBUILD
#define UNITTEST
@@ -640,6 +642,7 @@ UNITTEST DOHcode doh_decode(unsigned char *doh,
return DOH_OK; /* ok */
}
+#ifndef CURL_DISABLE_VERBOSE_STRINGS
static void showdoh(struct Curl_easy *data,
struct dohentry *d)
{
@@ -675,6 +678,9 @@ static void showdoh(struct Curl_easy *data,
infof(data, "CNAME: %s\n", d->cname[i].alloc);
}
}
+#else
+#define showdoh(x,y)
+#endif
/*
* doh2ai()
@@ -791,10 +797,12 @@ doh2ai(const struct dohentry *de, const char *hostname, int port)
return firstai;
}
+#ifndef CURL_DISABLE_VERBOSE_STRINGS
static const char *type2name(DNStype dnstype)
{
return (dnstype == DNS_TYPE_A)?"A":"AAAA";
}
+#endif
UNITTEST void de_cleanup(struct dohentry *d)
{