From 0975eeedd787f3171cca2f38c766364ca1ebb0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Mon, 29 Jun 2020 10:23:23 +0200 Subject: [PATCH] Fix libdns CFLAGS Since lib/dns/include/dns/view.h unconditionally defines dnstap-related fields in struct dns_view (and includes ), care must be taken to ensure that any source file which includes gets built with a set of CFLAGS which allows to be properly processed (particularly its and conditional dependencies which are only included for dnstap-enabled builds). Ensure that by making LIBDNS_CFLAGS include DNSTAP_CFLAGS when building with dnstap support. The same reasoning applies for LMDB_CFLAGS. --- Makefile.top | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile.top b/Makefile.top index b7d711c77c..140ab4406e 100644 --- a/Makefile.top +++ b/Makefile.top @@ -42,6 +42,16 @@ LIBDNS_CFLAGS = \ LIBDNS_LIBS = \ $(top_builddir)/lib/dns/libdns.la +if HAVE_DNSTAP +LIBDNS_CFLAGS += \ + $(DNSTAP_CFLAGS) +endif HAVE_DNSTAP + +if HAVE_LMDB +LIBDNS_CFLAGS += \ + $(LMDB_CFLAGS) +endif HAVE_LMDB + LIBNS_CFLAGS = \ -I$(top_srcdir)/lib/ns/include