summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIwan Timmer <irtimmer@gmail.com>2019-06-18 18:54:55 +0200
committerIwan Timmer <iwan.timmer@northwave.nl>2019-06-19 13:10:44 +0200
commitaedf00a2bd39d70306d76a15fa535123d6d277fd (patch)
tree12b13a11fd972f80952f1f77abec7a0416bcacb3
parentresolved: add missing error code check when initializing DNS-over-TLS (diff)
downloadsystemd-aedf00a2bd39d70306d76a15fa535123d6d277fd.tar.xz
systemd-aedf00a2bd39d70306d76a15fa535123d6d277fd.zip
resolved: don't require check when importing resolved-dnstls.h
-rw-r--r--src/resolve/resolved-dns-server.h4
-rw-r--r--src/resolve/resolved-dns-stream.h4
-rw-r--r--src/resolve/resolved-dns-transaction.c4
-rw-r--r--src/resolve/resolved-dnstls.h7
4 files changed, 7 insertions, 12 deletions
diff --git a/src/resolve/resolved-dns-server.h b/src/resolve/resolved-dns-server.h
index 3c4627bca5..2c0457243b 100644
--- a/src/resolve/resolved-dns-server.h
+++ b/src/resolve/resolved-dns-server.h
@@ -35,11 +35,9 @@ typedef enum DnsServerFeatureLevel {
const char* dns_server_feature_level_to_string(int i) _const_;
int dns_server_feature_level_from_string(const char *s) _pure_;
+#include "resolved-dnstls.h"
#include "resolved-link.h"
#include "resolved-manager.h"
-#if ENABLE_DNS_OVER_TLS
-#include "resolved-dnstls.h"
-#endif
struct DnsServer {
Manager *manager;
diff --git a/src/resolve/resolved-dns-stream.h b/src/resolve/resolved-dns-stream.h
index 780051b38a..1013f6e45e 100644
--- a/src/resolve/resolved-dns-stream.h
+++ b/src/resolve/resolved-dns-stream.h
@@ -16,10 +16,8 @@ typedef enum DnsStreamType {
#include "resolved-dns-packet.h"
#include "resolved-dns-transaction.h"
-#include "resolved-manager.h"
-#if ENABLE_DNS_OVER_TLS
#include "resolved-dnstls.h"
-#endif
+#include "resolved-manager.h"
#define DNS_STREAM_WRITE_TLS_DATA 1
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c
index 2ef0234806..deb46fae7a 100644
--- a/src/resolve/resolved-dns-transaction.c
+++ b/src/resolve/resolved-dns-transaction.c
@@ -11,10 +11,8 @@
#include "random-util.h"
#include "resolved-dns-cache.h"
#include "resolved-dns-transaction.h"
-#include "resolved-llmnr.h"
-#if ENABLE_DNS_OVER_TLS
#include "resolved-dnstls.h"
-#endif
+#include "resolved-llmnr.h"
#include "string-table.h"
#define TRANSACTIONS_MAX 4096
diff --git a/src/resolve/resolved-dnstls.h b/src/resolve/resolved-dnstls.h
index 2212821bdf..1b9121171e 100644
--- a/src/resolve/resolved-dnstls.h
+++ b/src/resolve/resolved-dnstls.h
@@ -1,9 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
-#if !ENABLE_DNS_OVER_TLS
-#error This source file requires DNS-over-TLS to be enabled
-#endif
+#if ENABLE_DNS_OVER_TLS
typedef struct DnsTlsManagerData DnsTlsManagerData;
typedef struct DnsTlsServerData DnsTlsServerData;
@@ -19,6 +17,7 @@ typedef struct DnsTlsStreamData DnsTlsStreamData;
#include "resolved-dns-stream.h"
#include "resolved-dns-transaction.h"
+#include "resolved-manager.h"
#define DNSTLS_STREAM_CLOSED 1
@@ -33,3 +32,5 @@ void dnstls_server_free(DnsServer *server);
int dnstls_manager_init(Manager *manager);
void dnstls_manager_free(Manager *manager);
+
+#endif /* ENABLE_DNS_OVER_TLS */