aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-04-06 19:39:59 +0200
committerRiccardo Spagni <ric@spagni.net>2015-04-06 19:39:59 +0200
commitcbddb5f6903a45088671096807317b0eae8073a7 (patch)
tree1fb4f5047d78f19a26486d7a02b7b66050d40c66 /external
parentno newline at end of file (diff)
downloadmonero-cbddb5f6903a45088671096807317b0eae8073a7.tar.xz
updated unbound cmake for static builds
Diffstat (limited to 'external')
-rw-r--r--external/unbound/CMakeLists.txt2
-rw-r--r--external/unbound/config.h.cmake.in31
-rw-r--r--external/unbound/configure_checks.cmake3
3 files changed, 34 insertions, 2 deletions
diff --git a/external/unbound/CMakeLists.txt b/external/unbound/CMakeLists.txt
index 507beec34..4fd8b9bfe 100644
--- a/external/unbound/CMakeLists.txt
+++ b/external/unbound/CMakeLists.txt
@@ -104,7 +104,7 @@ set(common_src
set(compat_src)
-foreach (symbol IN ITEMS ctime_r gmtime_r inet_aton inet_ntop inet_pton malloc memcmp memmove snprintf strlcat strlcpy strptime explicit_bzero arc4random arc4random_uniform sha512)
+foreach (symbol IN ITEMS ctime_r gmtime_r inet_aton inet_ntop inet_pton malloc memcmp memmove snprintf strlcat strlcpy strptime explicit_bzero arc4random arc4random_uniform sha512 reallocarray)
string(TOUPPER "${symbol}" upper_sym)
if (NOT HAVE_${upper_sym})
list(APPEND compat_src
diff --git a/external/unbound/config.h.cmake.in b/external/unbound/config.h.cmake.in
index 827503b6e..863a65421 100644
--- a/external/unbound/config.h.cmake.in
+++ b/external/unbound/config.h.cmake.in
@@ -45,7 +45,7 @@
/* Whether the C compiler accepts the "unused" attribute */
#cmakedefine HAVE_ATTR_UNUSED
-/* Define to 1 if your system has a working `chown' function. */
+/* Define to 1 if you have the `chown' function. */
#cmakedefine HAVE_CHOWN
/* Define to 1 if you have the `chroot' function. */
@@ -73,6 +73,10 @@
if you don't. */
#cmakedefine HAVE_DECL_NID_X9_62_PRIME256V1
+/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
+ don't. */
+#cmakedefine HAVE_DECL_REALLOCARRAY
+
/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
if you don't. */
#cmakedefine HAVE_DECL_SK_SSL_COMP_POP_FREE
@@ -149,6 +153,9 @@
/* Whether getaddrinfo is available */
#cmakedefine HAVE_GETADDRINFO
+/* Define to 1 if you have the `getauxval' function. */
+#cmakedefine HAVE_GETAUXVAL
+
/* Define to 1 if you have the `getentropy' function. */
#cmakedefine HAVE_GETENTROPY
@@ -266,6 +273,9 @@
/* Define to 1 if you have the `random' function. */
#cmakedefine HAVE_RANDOM
+/* Define to 1 if you have the `reallocarray' function. */
+#cmakedefine HAVE_REALLOCARRAY
+
/* Define to 1 if you have the `recvmsg' function. */
#cmakedefine HAVE_RECVMSG
@@ -353,6 +363,9 @@
/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
#cmakedefine HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST
+/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
+#cmakedefine HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
+
/* Define if you have Swig libraries and header files. */
#cmakedefine HAVE_SWIG
@@ -383,6 +396,9 @@
/* Define to 1 if you have the <sys/uio.h> header file. */
#cmakedefine HAVE_SYS_UIO_H
+/* Define to 1 if you have the <sys/un.h> header file. */
+#cmakedefine HAVE_SYS_UN_H
+
/* Define to 1 if you have the <sys/wait.h> header file. */
#cmakedefine HAVE_SYS_WAIT_H
@@ -805,6 +821,10 @@
#endif
+#ifndef AF_LOCAL
+#define AF_LOCAL AF_UNIX
+#endif
+
#ifdef HAVE_ATTR_FORMAT
# define ATTR_FORMAT(archetype, string_index, first_to_check) \
@@ -887,6 +907,12 @@ struct tm *gmtime_r(const time_t *timep, struct tm *result);
#endif
+#ifndef HAVE_REALLOCARRAY
+#define reallocarray reallocarrayunbound
+void* reallocarray(void *ptr, size_t nmemb, size_t size);
+#endif
+
+
#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
#define sleep(x) Sleep((x)*1000) /* on win32 */
#endif /* HAVE_SLEEP */
@@ -952,6 +978,9 @@ uint32_t arc4random(void);
# if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
uint32_t arc4random_uniform(uint32_t upper_bound);
# endif
+# if !HAVE_DECL_REALLOCARRAY
+void *reallocarray(void *ptr, size_t nmemb, size_t size);
+# endif
#endif /* HAVE_LIBRESSL */
#ifndef HAVE_ARC4RANDOM
void explicit_bzero(void* buf, size_t len);
diff --git a/external/unbound/configure_checks.cmake b/external/unbound/configure_checks.cmake
index ead51e98f..6b812858e 100644
--- a/external/unbound/configure_checks.cmake
+++ b/external/unbound/configure_checks.cmake
@@ -33,6 +33,7 @@ check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/sysctl.h HAVE_SYS_SYSCTL_H)
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
check_include_file(sys/uio.h HAVE_SYS_UIO_H)
+check_include_file(sys/un.h HAVE_SYS_UN_H)
check_include_file(sys/wait.h HAVE_SYS_WAIT_H)
check_include_file(syslog.h HAVE_SYSLOG_H)
check_include_file(time.h HAVE_TIME_H)
@@ -59,6 +60,7 @@ check_function_exists(endservent HAVE_ENDSERVENT)
check_function_exists(fnctl HAVE_FNCTL)
check_function_exists(fork HAVE_FORK)
check_function_exists(fseeko HAVE_FSEEKO)
+check_function_exists(getauxval HAVE_GETAUXVAL)
check_function_exists(getentropy HAVE_GETENTROPY)
check_function_exists(getpwnam HAVE_GETPWNAM)
check_function_exists(getrlimit HAVE_GETRLIMIT)
@@ -74,6 +76,7 @@ check_function_exists(localtime_r HAVE_LOCALTIME_R)
check_function_exists(malloc HAVE_MALLOC)
check_function_exists(memmove HAVE_MEMMOVE)
check_function_exists(random HAVE_RANDOM)
+check_function_exists(reallocarray HAVE_DECL_REALLOCARRAY)
check_function_exists(recvmsg HAVE_RECVMSG)
check_function_exists(sbrk HAVE_SBRK)
check_function_exists(sendmsg HAVE_SENDMSG)