From: Wouter Wijngaards Date: Fri, 12 Mar 2010 15:17:48 +0000 (+0000) Subject: Move includes to code files. X-Git-Tag: release-1.4.4rc1~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=147d47eee7c4a1d9b48ab573d0e1831b024e8f95;p=thirdparty%2Funbound.git Move includes to code files. git-svn-id: file:///svn/unbound/trunk@2035 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/config.h.in b/config.h.in index c522663ee..cdb416d65 100644 --- a/config.h.in +++ b/config.h.in @@ -653,26 +653,6 @@ #include #endif -#ifdef HAVE_GETOPT_H -#include -#endif - -#ifdef HAVE_OPENSSL_ERR_H -#include -#endif - -#ifdef HAVE_OPENSSL_RAND_H -#include -#endif - -#ifdef HAVE_OPENSSL_CONF_H -#include -#endif - -#ifdef HAVE_OPENSSL_ENGINE_H -#include -#endif - #ifdef HAVE_ATTR_FORMAT @@ -819,8 +799,6 @@ struct sockaddr_storage; #include "compat/fake-rfc2553.h" #endif -#include "ldns/ldns.h" - #ifdef UNBOUND_ALLOC_STATS # define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__) # define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__) diff --git a/configure.ac b/configure.ac index 6eff2bf03..76dd44179 100644 --- a/configure.ac +++ b/configure.ac @@ -703,26 +703,6 @@ dnl includes #ifdef HAVE_WS2TCPIP_H #include #endif - -#ifdef HAVE_GETOPT_H -#include -#endif - -#ifdef HAVE_OPENSSL_ERR_H -#include -#endif - -#ifdef HAVE_OPENSSL_RAND_H -#include -#endif - -#ifdef HAVE_OPENSSL_CONF_H -#include -#endif - -#ifdef HAVE_OPENSSL_ENGINE_H -#include -#endif ] AHX_CONFIG_FORMAT_ATTRIBUTE @@ -771,8 +751,6 @@ struct sockaddr_storage; #include "compat/fake-rfc2553.h" #endif -#include "ldns/ldns.h" - #ifdef UNBOUND_ALLOC_STATS # define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__) # define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__) diff --git a/daemon/cachedump.c b/daemon/cachedump.c index 3e8b124ab..35f0fe446 100644 --- a/daemon/cachedump.c +++ b/daemon/cachedump.c @@ -40,6 +40,7 @@ * to text format. */ #include "config.h" +#include "ldns/ldns.h" #include "daemon/cachedump.h" #include "daemon/remote.h" #include "daemon/worker.h" diff --git a/daemon/daemon.c b/daemon/daemon.c index ccd157366..fb293b506 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -40,6 +40,22 @@ */ #include "config.h" +#ifdef HAVE_OPENSSL_ERR_H +#include +#endif + +#ifdef HAVE_OPENSSL_RAND_H +#include +#endif + +#ifdef HAVE_OPENSSL_CONF_H +#include +#endif + +#ifdef HAVE_OPENSSL_ENGINE_H +#include +#endif +#include "ldns/ldns.h" #include "daemon/daemon.h" #include "daemon/worker.h" #include "daemon/remote.h" diff --git a/daemon/remote.c b/daemon/remote.c index 572f61c3c..7a6f5a6ff 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -43,6 +43,11 @@ * Both the server and the client(control tool) have their own keys. */ #include "config.h" +#ifdef HAVE_OPENSSL_ERR_H +#include +#endif +#include +#include "ldns/ldns.h" #include "daemon/remote.h" #include "daemon/worker.h" #include "daemon/daemon.h" diff --git a/daemon/remote.h b/daemon/remote.h index bd58cbc90..1edc1b887 100644 --- a/daemon/remote.h +++ b/daemon/remote.h @@ -45,6 +45,9 @@ #ifndef DAEMON_REMOTE_H #define DAEMON_REMOTE_H +#ifdef HAVE_OPENSSL_SSL_H +#include "openssl/ssl.h" +#endif struct config_file; struct listen_list; struct listen_port; diff --git a/daemon/stats.c b/daemon/stats.c index b9474c744..41b4fb80c 100644 --- a/daemon/stats.c +++ b/daemon/stats.c @@ -40,6 +40,7 @@ * numbers. These 'statistics' may be of interest to the operator. */ #include "config.h" +#include "ldns/wire2host.h" #include "daemon/stats.h" #include "daemon/worker.h" #include "daemon/daemon.h" diff --git a/daemon/stats.h b/daemon/stats.h index fa526d618..ad93dde5f 100644 --- a/daemon/stats.h +++ b/daemon/stats.h @@ -43,6 +43,7 @@ #ifndef DAEMON_STATS_H #define DAEMON_STATS_H #include "util/timehist.h" +#include "ldns/buffer.h" struct worker; struct config_file; struct comm_point; diff --git a/daemon/unbound.c b/daemon/unbound.c index 9e4ea3747..afa6a47dc 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -41,6 +41,9 @@ */ #include "config.h" +#ifdef HAVE_GETOPT_H +#include +#endif #include "util/log.h" #include "daemon/daemon.h" #include "daemon/remote.h" diff --git a/daemon/worker.c b/daemon/worker.c index 053c6e73e..76e513533 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -40,6 +40,7 @@ * pending requests. */ #include "config.h" +#include "ldns/wire2host.h" #include "util/log.h" #include "util/net_help.h" #include "util/random.h" diff --git a/doc/Changelog b/doc/Changelog index 264acf0e1..69bfab2db 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -5,6 +5,7 @@ - ldns tarball updated. - Fix python use when multithreaded. - Fix solaris python compile. + - Include less in config.h and include per code file for ldns, ssl. 11 March 2010: Wouter - another memory allocation option: --enable-alloc-nonregional. diff --git a/iterator/iter_fwd.c b/iterator/iter_fwd.c index 0d19c0c0a..f0fca1edd 100644 --- a/iterator/iter_fwd.c +++ b/iterator/iter_fwd.c @@ -40,6 +40,9 @@ * Keep track of forward zones and config settings. */ #include "config.h" +#include "ldns/rdata.h" +#include "ldns/dname.h" +#include "ldns/rr.h" #include "iterator/iter_fwd.h" #include "iterator/iter_delegpt.h" #include "util/regional.h" diff --git a/iterator/iter_hints.c b/iterator/iter_hints.c index 1ca46a12b..bf7406842 100644 --- a/iterator/iter_hints.c +++ b/iterator/iter_hints.c @@ -40,6 +40,8 @@ * Keep track of stub and root hints, and read those from config. */ #include "config.h" +#include "ldns/dname.h" +#include "ldns/rr.h" #include "iterator/iter_hints.h" #include "iterator/iter_delegpt.h" #include "util/regional.h" diff --git a/iterator/iter_priv.c b/iterator/iter_priv.c index 03cf6db85..2d97a93ad 100644 --- a/iterator/iter_priv.c +++ b/iterator/iter_priv.c @@ -41,6 +41,7 @@ */ #include "config.h" +#include "ldns/dname.h" #include "iterator/iter_priv.h" #include "util/regional.h" #include "util/log.h" diff --git a/iterator/iter_priv.h b/iterator/iter_priv.h index 62860ffb5..164f69cc7 100644 --- a/iterator/iter_priv.h +++ b/iterator/iter_priv.h @@ -43,6 +43,7 @@ #ifndef ITERATOR_ITER_PRIV_H #define ITERATOR_ITER_PRIV_H #include "util/rbtree.h" +#include "ldns/buffer.h" struct iter_env; struct config_file; struct regional; diff --git a/iterator/iter_resptype.c b/iterator/iter_resptype.c index 9f7726c60..b7d022dbe 100644 --- a/iterator/iter_resptype.c +++ b/iterator/iter_resptype.c @@ -40,6 +40,7 @@ * one of the response types. */ #include "config.h" +#include "ldns/packet.h" #include "iterator/iter_resptype.h" #include "iterator/iter_delegpt.h" #include "services/cache/dns.h" diff --git a/iterator/iter_scrub.h b/iterator/iter_scrub.h index 8bceb0059..dc246205a 100644 --- a/iterator/iter_scrub.h +++ b/iterator/iter_scrub.h @@ -42,6 +42,7 @@ #ifndef ITERATOR_ITER_SCRUB_H #define ITERATOR_ITER_SCRUB_H +#include "ldns/buffer.h" struct msg_parse; struct query_info; struct regional; diff --git a/iterator/iter_utils.h b/iterator/iter_utils.h index 2a1a724c2..9a1db5fe9 100644 --- a/iterator/iter_utils.h +++ b/iterator/iter_utils.h @@ -43,6 +43,7 @@ #ifndef ITERATOR_ITER_UTILS_H #define ITERATOR_ITER_UTILS_H #include "iterator/iter_resptype.h" +#include "ldns/buffer.h" struct iter_env; struct iter_hints; struct iter_forwards; diff --git a/iterator/iterator.c b/iterator/iterator.c index 33635b50e..d8b5588a7 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -41,6 +41,7 @@ */ #include "config.h" +#include "ldns/ldns.h" #include "iterator/iterator.h" #include "iterator/iter_utils.h" #include "iterator/iter_hints.h" diff --git a/libunbound/libunbound.c b/libunbound/libunbound.c index aae452ace..804eb9675 100644 --- a/libunbound/libunbound.c +++ b/libunbound/libunbound.c @@ -44,6 +44,7 @@ /* include the public api first, it should be able to stand alone */ #include "libunbound/unbound.h" #include "config.h" +#include #include "libunbound/context.h" #include "libunbound/libworker.h" #include "util/locks.h" diff --git a/libunbound/libworker.c b/libunbound/libworker.c index dc54b03a2..0c28b7615 100644 --- a/libunbound/libworker.c +++ b/libunbound/libworker.c @@ -42,6 +42,8 @@ * returns from the procedure when done. */ #include "config.h" +#include +#include #include "libunbound/libworker.h" #include "libunbound/context.h" #include "libunbound/unbound.h" diff --git a/pythonmod/pythonmod.c b/pythonmod/pythonmod.c index bfeb521d1..579b82ab3 100644 --- a/pythonmod/pythonmod.c +++ b/pythonmod/pythonmod.c @@ -44,6 +44,7 @@ #endif #include "config.h" +#include "ldns/ldns.h" #undef _POSIX_C_SOURCE #undef _XOPEN_SOURCE diff --git a/services/cache/infra.c b/services/cache/infra.c index fbc52549a..9c32c8110 100644 --- a/services/cache/infra.c +++ b/services/cache/infra.c @@ -39,6 +39,7 @@ * This file contains the infrastructure cache. */ #include "config.h" +#include "ldns/rr.h" #include "services/cache/infra.h" #include "util/storage/slabhash.h" #include "util/storage/lookup3.h" diff --git a/services/localzone.c b/services/localzone.c index 0a870e59d..dba7f3b33 100644 --- a/services/localzone.c +++ b/services/localzone.c @@ -39,6 +39,8 @@ * This file contains functions to enable local zone authority service. */ #include "config.h" +#include "ldns/dname.h" +#include "ldns/host2wire.h" #include "services/localzone.h" #include "util/regional.h" #include "util/config_file.h" diff --git a/services/mesh.c b/services/mesh.c index 6a5cc926f..ff34016f7 100644 --- a/services/mesh.c +++ b/services/mesh.c @@ -43,6 +43,7 @@ * send back to clients. */ #include "config.h" +#include "ldns/wire2host.h" #include "services/mesh.h" #include "services/outbound_list.h" #include "services/cache/dns.h" diff --git a/services/modstack.c b/services/modstack.c index e57c0247a..7395598c3 100644 --- a/services/modstack.c +++ b/services/modstack.c @@ -39,6 +39,7 @@ * This file contains functions to help maintain a stack of modules. */ #include "config.h" +#include #include "services/modstack.h" #include "util/module.h" #include "util/fptr_wlist.h" diff --git a/services/outside_network.c b/services/outside_network.c index 6fe8268b0..02eead896 100644 --- a/services/outside_network.c +++ b/services/outside_network.c @@ -40,6 +40,8 @@ * wait for the pending answer events. */ #include "config.h" +#include +#include "ldns/wire2host.h" #include "services/outside_network.h" #include "services/listen_dnsport.h" #include "services/cache/infra.h" diff --git a/smallapp/unbound-checkconf.c b/smallapp/unbound-checkconf.c index f48088ae2..40ca6b72b 100644 --- a/smallapp/unbound-checkconf.c +++ b/smallapp/unbound-checkconf.c @@ -52,6 +52,9 @@ #include "iterator/iter_fwd.h" #include "validator/validator.h" #include "services/localzone.h" +#ifdef HAVE_GETOPT_H +#include +#endif #ifdef HAVE_PWD_H #include #endif diff --git a/smallapp/unbound-control.c b/smallapp/unbound-control.c index ed9c88bda..57741dd2e 100644 --- a/smallapp/unbound-control.c +++ b/smallapp/unbound-control.c @@ -42,6 +42,18 @@ */ #include "config.h" +#ifdef HAVE_GETOPT_H +#include +#endif +#ifdef HAVE_OPENSSL_SSL_H +#include +#endif +#ifdef HAVE_OPENSSL_ERR_H +#include +#endif +#ifdef HAVE_OPENSSL_RAND_H +#include +#endif #include "util/log.h" #include "util/config_file.h" #include "util/locks.h" diff --git a/smallapp/unbound-host.c b/smallapp/unbound-host.c index 88d0b8a1e..2a663a9d4 100644 --- a/smallapp/unbound-host.c +++ b/smallapp/unbound-host.c @@ -41,6 +41,9 @@ */ #include "config.h" +#ifdef HAVE_GETOPT_H +#include +#endif /* remove alloc checks, not in this part of the code */ #ifdef UNBOUND_ALLOC_STATS #undef malloc diff --git a/testcode/asynclook.c b/testcode/asynclook.c index 9ee4312da..6abab7b22 100644 --- a/testcode/asynclook.c +++ b/testcode/asynclook.c @@ -41,6 +41,9 @@ */ #include "config.h" +#ifdef HAVE_GETOPT_H +#include +#endif #include "libunbound/unbound.h" #include "libunbound/context.h" #include "util/locks.h" diff --git a/testcode/delayer.c b/testcode/delayer.c index b5a0594c6..b3b6ffcdb 100644 --- a/testcode/delayer.c +++ b/testcode/delayer.c @@ -41,6 +41,13 @@ */ #include "config.h" +#ifdef HAVE_GETOPT_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif +#include #include "util/net_help.h" #include "util/config_file.h" #include diff --git a/testcode/harvest.c b/testcode/harvest.c index e84f255dc..7b1342f45 100644 --- a/testcode/harvest.c +++ b/testcode/harvest.c @@ -69,6 +69,10 @@ */ #include "config.h" +#ifdef HAVE_GETOPT_H +#include +#endif +#include "ldns/ldns.h" #include #include "libunbound/unbound.h" #ifdef HAVE_SYS_STAT_H diff --git a/testcode/perf.c b/testcode/perf.c index fe7f07369..e079a19ea 100644 --- a/testcode/perf.c +++ b/testcode/perf.c @@ -40,6 +40,10 @@ */ #include "config.h" +#ifdef HAVE_GETOPT_H +#include +#endif +#include "ldns/ldns.h" #include #include "util/log.h" #include "util/locks.h" diff --git a/testcode/pktview.c b/testcode/pktview.c index 0b66cc912..494f8e7b3 100644 --- a/testcode/pktview.c +++ b/testcode/pktview.c @@ -40,6 +40,7 @@ */ #include "config.h" +#include "ldns/ldns.h" #include "util/log.h" #include "util/data/dname.h" #include "util/data/msgparse.h" diff --git a/testcode/readhex.c b/testcode/readhex.c index 70a3603d0..f212ddd74 100644 --- a/testcode/readhex.c +++ b/testcode/readhex.c @@ -38,6 +38,7 @@ * Declarations useful for the unit tests. */ #include "config.h" +#include #include "testcode/readhex.h" #include "util/log.h" diff --git a/testcode/readhex.h b/testcode/readhex.h index bdd9aee52..c145829a1 100644 --- a/testcode/readhex.h +++ b/testcode/readhex.h @@ -40,6 +40,7 @@ #ifndef TESTCODE_READHEX_H #define TESTCODE_READHEX_H +#include "ldns/buffer.h" /** * Helper to convert hex string to packet buffer. diff --git a/testcode/signit.c b/testcode/signit.c index 3072ffefa..52f06a86b 100644 --- a/testcode/signit.c +++ b/testcode/signit.c @@ -40,6 +40,7 @@ * construct input to test the validator with. */ #include "config.h" +#include "ldns/ldns.h" #include "util/log.h" #include "util/config_file.h" #include "util/net_help.h" diff --git a/testcode/streamtcp.c b/testcode/streamtcp.c index 68d5a3098..bf1b597a7 100644 --- a/testcode/streamtcp.c +++ b/testcode/streamtcp.c @@ -40,6 +40,10 @@ */ #include "config.h" +#ifdef HAVE_GETOPT_H +#include +#endif +#include "ldns/ldns.h" #include #include "util/locks.h" #include "util/log.h" diff --git a/testcode/unitanchor.c b/testcode/unitanchor.c index ac7b9d5b5..346b417b7 100644 --- a/testcode/unitanchor.c +++ b/testcode/unitanchor.c @@ -39,6 +39,7 @@ */ #include "config.h" +#include "ldns/rr.h" #include "util/log.h" #include "util/data/dname.h" #include "testcode/unitmain.h" diff --git a/testcode/unitdname.c b/testcode/unitdname.c index 3c3d71ac8..d4c745fca 100644 --- a/testcode/unitdname.c +++ b/testcode/unitdname.c @@ -39,6 +39,8 @@ */ #include "config.h" +#include "ldns/dname.h" +#include "ldns/host2wire.h" #include "util/log.h" #include "testcode/unitmain.h" #include "util/data/dname.h" diff --git a/testcode/unitmain.c b/testcode/unitmain.c index adde574e5..6b540db9d 100644 --- a/testcode/unitmain.c +++ b/testcode/unitmain.c @@ -40,6 +40,22 @@ */ #include "config.h" +#ifdef HAVE_OPENSSL_ERR_H +#include +#endif + +#ifdef HAVE_OPENSSL_RAND_H +#include +#endif + +#ifdef HAVE_OPENSSL_CONF_H +#include +#endif + +#ifdef HAVE_OPENSSL_ENGINE_H +#include +#endif +#include "ldns/ldns.h" #include "util/log.h" #include "testcode/unitmain.h" diff --git a/testcode/unitmsgparse.c b/testcode/unitmsgparse.c index bee500bcf..43e43778d 100644 --- a/testcode/unitmsgparse.c +++ b/testcode/unitmsgparse.c @@ -39,6 +39,7 @@ */ #include "config.h" +#include "ldns/ldns.h" #include "util/log.h" #include "testcode/unitmain.h" #include "util/data/msgparse.h" diff --git a/util/config_file.c b/util/config_file.c index 8d014e185..e818df9a2 100644 --- a/util/config_file.c +++ b/util/config_file.c @@ -40,6 +40,8 @@ */ #include "config.h" +#include +#include "ldns/ldns.h" #include "util/log.h" #include "util/configyyrename.h" diff --git a/util/data/dname.c b/util/data/dname.c index 0cf10765b..b78897919 100644 --- a/util/data/dname.c +++ b/util/data/dname.c @@ -40,6 +40,7 @@ */ #include "config.h" +#include #include "util/data/dname.h" #include "util/data/msgparse.h" #include "util/log.h" diff --git a/util/data/msgencode.c b/util/data/msgencode.c index b98719843..32567e2b7 100644 --- a/util/data/msgencode.c +++ b/util/data/msgencode.c @@ -40,6 +40,7 @@ */ #include "config.h" +#include "ldns/wire2host.h" #include "util/data/msgencode.h" #include "util/data/msgreply.h" #include "util/data/msgparse.h" diff --git a/util/data/msgparse.c b/util/data/msgparse.c index 4655943ce..2db8832ce 100644 --- a/util/data/msgparse.c +++ b/util/data/msgparse.c @@ -37,6 +37,7 @@ * Routines for message parsing a packet buffer to a descriptive structure. */ #include "config.h" +#include "ldns/ldns.h" #include "util/data/msgparse.h" #include "util/net_help.h" #include "util/data/dname.h" diff --git a/util/data/msgparse.h b/util/data/msgparse.h index bc367fd7e..a5d10eb99 100644 --- a/util/data/msgparse.h +++ b/util/data/msgparse.h @@ -63,6 +63,7 @@ #ifndef UTIL_DATA_MSGPARSE_H #define UTIL_DATA_MSGPARSE_H #include "util/storage/lruhash.h" +#include "ldns/packet.h" struct rrset_parse; struct rr_parse; struct regional; diff --git a/util/data/msgreply.c b/util/data/msgreply.c index 65f344fbe..22e146884 100644 --- a/util/data/msgreply.c +++ b/util/data/msgreply.c @@ -40,6 +40,7 @@ */ #include "config.h" +#include "ldns/ldns.h" #include "util/data/msgreply.h" #include "util/storage/lookup3.h" #include "util/log.h" diff --git a/util/data/packed_rrset.c b/util/data/packed_rrset.c index c1791eda7..77780d613 100644 --- a/util/data/packed_rrset.c +++ b/util/data/packed_rrset.c @@ -40,6 +40,7 @@ */ #include "config.h" +#include "ldns/wire2host.h" #include "util/data/packed_rrset.h" #include "util/data/dname.h" #include "util/storage/lookup3.h" diff --git a/util/data/packed_rrset.h b/util/data/packed_rrset.h index ad09cae63..92fef8151 100644 --- a/util/data/packed_rrset.h +++ b/util/data/packed_rrset.h @@ -42,6 +42,7 @@ #ifndef UTIL_DATA_PACKED_RRSET_H #define UTIL_DATA_PACKED_RRSET_H #include "util/storage/lruhash.h" +#include "ldns/rr.h" struct alloc_cache; struct regional; diff --git a/util/log.h b/util/log.h index a69a26f92..4f8ac7a7e 100644 --- a/util/log.h +++ b/util/log.h @@ -41,6 +41,7 @@ #ifndef UTIL_LOG_H #define UTIL_LOG_H +#include "ldns/buffer.h" /** * verbosity value: diff --git a/util/mini_event.c b/util/mini_event.c index aa5a92e6f..f66214ddb 100644 --- a/util/mini_event.c +++ b/util/mini_event.c @@ -41,6 +41,10 @@ */ #include "config.h" +#ifdef HAVE_TIME_H +#include +#endif +#include #if defined(USE_MINI_EVENT) && !defined(USE_WINSOCK) #include diff --git a/util/net_help.c b/util/net_help.c index 8733bb8f8..182f39d8e 100644 --- a/util/net_help.c +++ b/util/net_help.c @@ -38,6 +38,7 @@ */ #include "config.h" +#include "ldns/ldns.h" #include "util/net_help.h" #include "util/log.h" #include "util/data/dname.h" diff --git a/util/netevent.c b/util/netevent.c index 2f2635744..eda289203 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -39,6 +39,7 @@ * This file contains event notification functions. */ #include "config.h" +#include "ldns/wire2host.h" #include "util/netevent.h" #include "util/log.h" #include "util/net_help.h" diff --git a/util/netevent.h b/util/netevent.h index d9d43c0a2..68f8428b5 100644 --- a/util/netevent.h +++ b/util/netevent.h @@ -60,6 +60,7 @@ #ifndef NET_EVENT_H #define NET_EVENT_H +#include "ldns/buffer.h" struct comm_point; struct comm_reply; struct event_base; diff --git a/validator/autotrust.c b/validator/autotrust.c index 56c83b264..4e90862ce 100644 --- a/validator/autotrust.c +++ b/validator/autotrust.c @@ -41,6 +41,7 @@ * It was modified to fit into unbound. The state table process is the same. */ #include "config.h" +#include "ldns/ldns.h" #include "validator/autotrust.h" #include "validator/val_anchor.h" #include "validator/val_utils.h" diff --git a/validator/val_anchor.c b/validator/val_anchor.c index 4c6116373..0b4ca4259 100644 --- a/validator/val_anchor.c +++ b/validator/val_anchor.c @@ -39,6 +39,9 @@ * This file contains storage for the trust anchors for the validator. */ #include "config.h" +#include +#include "ldns/dname.h" +#include "ldns/host2wire.h" #include "validator/val_anchor.h" #include "validator/val_sigcrypt.h" #include "validator/autotrust.h" diff --git a/validator/val_kentry.c b/validator/val_kentry.c index fccaed431..d58630fc5 100644 --- a/validator/val_kentry.c +++ b/validator/val_kentry.c @@ -39,6 +39,7 @@ * This file contains functions for dealing with validator key entries. */ #include "config.h" +#include "ldns/ldns.h" #include "validator/val_kentry.h" #include "util/data/packed_rrset.h" #include "util/data/dname.h" diff --git a/validator/val_neg.c b/validator/val_neg.c index 6c9b7da14..27839c6ab 100644 --- a/validator/val_neg.c +++ b/validator/val_neg.c @@ -42,6 +42,9 @@ * from cached NSEC records. */ #include "config.h" +#ifdef HAVE_OPENSSL_SSL_H +#include "openssl/ssl.h" +#endif #include "validator/val_neg.h" #include "validator/val_nsec.h" #include "validator/val_nsec3.h" diff --git a/validator/val_nsec.c b/validator/val_nsec.c index 5ddb9ad2c..195b5494a 100644 --- a/validator/val_nsec.c +++ b/validator/val_nsec.c @@ -41,6 +41,7 @@ * for denial of existance, and proofs for presence of types. */ #include "config.h" +#include "ldns/packet.h" #include "validator/val_nsec.h" #include "validator/val_utils.h" #include "util/data/msgreply.h" diff --git a/validator/val_nsec3.c b/validator/val_nsec3.c index a99f19f0a..c48e91351 100644 --- a/validator/val_nsec3.c +++ b/validator/val_nsec3.c @@ -41,6 +41,10 @@ * for denial of existance, and proofs for presence of types. */ #include "config.h" +#include +#ifdef HAVE_OPENSSL_SSL_H +#include "openssl/ssl.h" +#endif #include "validator/val_nsec3.h" #include "validator/validator.h" #include "validator/val_kentry.h" diff --git a/validator/val_sigcrypt.c b/validator/val_sigcrypt.c index 84c25dda1..9ca21a1a9 100644 --- a/validator/val_sigcrypt.c +++ b/validator/val_sigcrypt.c @@ -41,6 +41,7 @@ * bridging between RR wireformat data and crypto calls. */ #include "config.h" +#include "ldns/ldns.h" #include "validator/val_sigcrypt.h" #include "validator/validator.h" #include "util/data/msgreply.h" @@ -55,6 +56,22 @@ #error "Need SSL library to do digital signature cryptography" #endif +#ifdef HAVE_OPENSSL_ERR_H +#include +#endif + +#ifdef HAVE_OPENSSL_RAND_H +#include +#endif + +#ifdef HAVE_OPENSSL_CONF_H +#include +#endif + +#ifdef HAVE_OPENSSL_ENGINE_H +#include +#endif + /** return number of rrs in an rrset */ static size_t rrset_get_count(struct ub_packed_rrset_key* rrset) diff --git a/validator/validator.c b/validator/validator.c index 5f26f6511..650b68958 100644 --- a/validator/validator.c +++ b/validator/validator.c @@ -40,6 +40,7 @@ * According to RFC 4034. */ #include "config.h" +#include "ldns/ldns.h" #include "validator/validator.h" #include "validator/val_anchor.h" #include "validator/val_kcache.h"