]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix endian.h include for OpenBSD.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 21 Jul 2014 00:06:54 +0000 (00:06 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 21 Jul 2014 00:06:54 +0000 (00:06 +0000)
git-svn-id: file:///svn/unbound/trunk@3196 be551aaa-1e26-0410-a405-d3ace91eadb9

config.h.in
configure
configure.ac
doc/Changelog
util/storage/lookup3.c

index ca2ca5a4f899fe29f693b57abbfd90d742c3abeb..08ba665966864f7b965f241c614484aeed1dcdef 100644 (file)
@@ -89,6 +89,9 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
+/* Define to 1 if you have the <endian.h> header file. */
+#undef HAVE_ENDIAN_H
+
 /* Define to 1 if you have the `endprotoent' function. */
 #undef HAVE_ENDPROTOENT
 
index b6923f14dd6b30d1385faffa0512a659f092aa3b..34fa6e005398d8c9b1da85b7a8d6d805bef308f4 100755 (executable)
--- a/configure
+++ b/configure
@@ -13692,7 +13692,7 @@ CC="$lt_save_CC"
 
 
 # Checks for header files.
-for ac_header in stdarg.h stdbool.h netinet/in.h sys/param.h sys/socket.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h
+for ac_header in stdarg.h stdbool.h netinet/in.h sys/param.h sys/socket.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
index 7bec4e1baba2710e02bdce2e809c6a9518df26d1..d5df2992d26b114079c7fb6ab33b669476d8c677 100644 (file)
@@ -264,7 +264,7 @@ AC_CHECK_TOOL(STRIP, strip)
 ACX_LIBTOOL_C_ONLY
 
 # Checks for header files.
-AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h sys/param.h sys/socket.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h],,, [AC_INCLUDES_DEFAULT])
+AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h sys/param.h sys/socket.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h],,, [AC_INCLUDES_DEFAULT])
 
 # check for types.  
 # Using own tests for int64* because autoconf builtin only give 32bit.
index d19397cd84e54a25d77f9c755ee72a44bdfb30b2..1c364d44129a093de84ebeef0b16685e2cb82dc8 100644 (file)
@@ -1,3 +1,6 @@
+21 July 2014: Wouter
+       - Fix endian.h include for OpenBSD.
+
 16 July 2014: Wouter
        - And Fix#596: Bail out of unbound-control dump_infra when ssl
          write fails.
index 7596033bdee27d4fed52f734a7b3f0d01539f8a7..de288587bdbf258f3bf531273d86b8d28cb54c7a 100644 (file)
@@ -53,15 +53,16 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy.
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h> /* attempt to define endianness (solaris) */
 #endif
-#ifdef linux
-# include <endian.h>    /* attempt to define endianness */
+#if defined(linux) || defined(__OpenBSD__)
+#  ifdef HAVE_ENDIAN_H
+#    include <endian.h>    /* attempt to define endianness */
+#  else
+#    include <machine/endian.h> /* on older OpenBSD */
+#  endif
 #endif
 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
 #include <sys/endian.h> /* attempt to define endianness */
 #endif
-#ifdef __OpenBSD__
-#include <machine/endian.h> /* attempt to define endianness */
-#endif
 
 /* random initial value */
 static uint32_t raninit = (uint32_t)0xdeadbeef;