Don't include OpenSSL headers in config.h.

Add an include of stdlib.h to various files that were relying on config.h to drag it in. I don't think config.h should be pulling in standard C headers.
This commit is contained in:
Jim Hague 2019-10-15 18:37:10 +01:00
parent 8362a183e8
commit cd62f2b716
7 changed files with 9 additions and 24 deletions

View File

@ -371,30 +371,6 @@ static inline int _gldns_custom_vsnprintf(char *str, size_t size, const char *fo
#include <sys/limits.h> #include <sys/limits.h>
#endif #endif
#ifdef HAVE_OPENSSL_SSL_H
#include <openssl/ssl.h>
#endif
#ifdef HAVE_OPENSSL_EVP_H
#include <openssl/evp.h>
#endif
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
#endif
#ifdef HAVE_OPENSSL_RAND_H
#include <openssl/rand.h>
#endif
#ifdef HAVE_OPENSSL_CONF_H
#include <openssl/conf.h>
#endif
#ifdef HAVE_OPENSSL_ENGINE_H
#include <openssl/engine.h>
#endif
#ifdef PATH_MAX #ifdef PATH_MAX
#define _GETDNS_PATH_MAX PATH_MAX #define _GETDNS_PATH_MAX PATH_MAX
#else #else

View File

@ -14,6 +14,7 @@
#include "config.h" #include "config.h"
#include "gldns/gbuffer.h" #include "gldns/gbuffer.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h>
gldns_buffer * gldns_buffer *
gldns_buffer_new(size_t capacity) gldns_buffer_new(size_t capacity)

View File

@ -13,6 +13,7 @@
#include "gldns/gbuffer.h" #include "gldns/gbuffer.h"
#include <limits.h> #include <limits.h>
#include <stdlib.h>
gldns_lookup_table gldns_directive_types[] = { gldns_lookup_table gldns_directive_types[] = {
{ GLDNS_DIR_TTL, "$TTL" }, { GLDNS_DIR_TTL, "$TTL" },

View File

@ -16,6 +16,8 @@
#include "gldns/rrdef.h" #include "gldns/rrdef.h"
#include "gldns/parseutil.h" #include "gldns/parseutil.h"
#include <stdlib.h>
/* classes */ /* classes */
static gldns_lookup_table gldns_rr_classes_data[] = { static gldns_lookup_table gldns_rr_classes_data[] = {
{ GLDNS_RR_CLASS_IN, "IN" }, { GLDNS_RR_CLASS_IN, "IN" },

View File

@ -24,6 +24,7 @@
#ifdef HAVE_NETDB_H #ifdef HAVE_NETDB_H
#include <netdb.h> #include <netdb.h>
#endif #endif
#include <stdlib.h>
/** return an error */ /** return an error */
#define RET_ERR(e, off) ((int)((e)|((off)<<GLDNS_WIREPARSE_SHIFT))) #define RET_ERR(e, off) ((int)((e)|((off)<<GLDNS_WIREPARSE_SHIFT)))

View File

@ -40,6 +40,8 @@
* *
*/ */
#include <stdlib.h>
#include "config.h" #include "config.h"
#include "util/storage/lruhash.h" #include "util/storage/lruhash.h"
#include "util/fptr_wlist.h" #include "util/fptr_wlist.h"

View File

@ -39,6 +39,8 @@
* Implementation of a redblack tree. * Implementation of a redblack tree.
*/ */
#include <stdlib.h>
#include "config.h" #include "config.h"
#include "log.h" #include "log.h"
#include "fptr_wlist.h" #include "fptr_wlist.h"