]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
portability fixes.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 27 Oct 2015 10:39:18 +0000 (10:39 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 27 Oct 2015 10:39:18 +0000 (10:39 +0000)
git-svn-id: file:///svn/unbound/trunk@3516 be551aaa-1e26-0410-a405-d3ace91eadb9

compat/arc4random.c
compat/getentropy_solaris.c
compat/reallocarray.c
smallapp/unbound-anchor.c

index 27a626b7ba51813316d421a030a0c49c91230929..2c859f18492942e2b62491817ca63fd8f936824a 100644 (file)
@@ -26,7 +26,9 @@
 #include <fcntl.h>
 #include <limits.h>
 #include <signal.h>
+#ifdef HAVE_STDINT_H
 #include <stdint.h>
+#endif
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 838957382e7f4edbf0836d7414eeb3f36443f04a..810098a8d8e4fca35a6009be01c52af1e8631bb1 100644 (file)
@@ -30,7 +30,9 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <stdlib.h>
+#ifdef HAVE_STDINT_H
 #include <stdint.h>
+#endif
 #include <stdio.h>
 #include <termios.h>
 #include <fcntl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <time.h>
+#ifdef HAVE_SYS_SHA2_H
 #include <sys/sha2.h>
 #define SHA512_Init SHA512Init
 #define SHA512_Update SHA512Update
 #define SHA512_Final SHA512Final
+#else
+#include "openssl/sha.h"
+#endif
 
 #include <sys/vfs.h>
 #include <sys/statfs.h>
index 04d5d71c8be67ebd9e9e65cd6badbaaf142beae3..c969bd067ec5d5b3fb151b757ec1fceee63b0b79 100644 (file)
 #include "config.h"
 #include <sys/types.h>
 #include <errno.h>
+#ifdef HAVE_STDINT_H
 #include <stdint.h>
+#endif
+#include <limits.h>
 #include <stdlib.h>
 
 /*
index e1b6d2b792dbd3e14a7d338a17666a6484541c72..612f0368fe4b0bf67f384dc58f510c8582b9501b 100644 (file)
@@ -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;