From aebee7b95c7f8b274c6dc8f27851bdec5a77fd1d Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Tue, 27 Oct 2015 10:39:18 +0000 Subject: [PATCH] portability fixes. git-svn-id: file:///svn/unbound/trunk@3516 be551aaa-1e26-0410-a405-d3ace91eadb9 --- compat/arc4random.c | 2 ++ compat/getentropy_solaris.c | 6 ++++++ compat/reallocarray.c | 3 +++ smallapp/unbound-anchor.c | 2 +- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/compat/arc4random.c b/compat/arc4random.c index 27a626b7b..2c859f184 100644 --- a/compat/arc4random.c +++ b/compat/arc4random.c @@ -26,7 +26,9 @@ #include #include #include +#ifdef HAVE_STDINT_H #include +#endif #include #include #include diff --git a/compat/getentropy_solaris.c b/compat/getentropy_solaris.c index 838957382..810098a8d 100644 --- a/compat/getentropy_solaris.c +++ b/compat/getentropy_solaris.c @@ -30,7 +30,9 @@ #include #include #include +#ifdef HAVE_STDINT_H #include +#endif #include #include #include @@ -39,10 +41,14 @@ #include #include #include +#ifdef HAVE_SYS_SHA2_H #include #define SHA512_Init SHA512Init #define SHA512_Update SHA512Update #define SHA512_Final SHA512Final +#else +#include "openssl/sha.h" +#endif #include #include diff --git a/compat/reallocarray.c b/compat/reallocarray.c index 04d5d71c8..c969bd067 100644 --- a/compat/reallocarray.c +++ b/compat/reallocarray.c @@ -18,7 +18,10 @@ #include "config.h" #include #include +#ifdef HAVE_STDINT_H #include +#endif +#include #include /* diff --git a/smallapp/unbound-anchor.c b/smallapp/unbound-anchor.c index e1b6d2b79..612f0368f 100644 --- a/smallapp/unbound-anchor.c +++ b/smallapp/unbound-anchor.c @@ -1520,7 +1520,7 @@ xml_entitydeclhandler(void *userData, const XML_Char *ATTR_UNUSED(publicId), const XML_Char *ATTR_UNUSED(notationName)) { -#ifdef HAVE_DECL_XML_STOPPARSER +#if HAVE_DECL_XML_STOPPARSER (void)XML_StopParser((XML_Parser)userData, XML_FALSE); #else (void)userData; -- 2.47.2