]> Git Repo - VerusCoin.git/commitdiff
Add an alternate location of endian.h header
authorAndriy Voskoboinyk <[email protected]>
Sun, 7 Jun 2015 01:38:31 +0000 (04:38 +0300)
committerWladimir J. van der Laan <[email protected]>
Tue, 23 Jun 2015 07:03:09 +0000 (09:03 +0200)
Github-Pull: #6246
Rebased-From: 0640a5eb60b06de61f873fd88ae0252f5a11c339

configure.ac
src/compat/endian.h

index 7b84827c7cacdaff43220e7153af44f2cf674187..37fe47e3c99e737bdf5cb5387ba4c093d66548c4 100644 (file)
@@ -438,7 +438,7 @@ if test x$TARGET_OS = xdarwin; then
   AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"])
 fi
 
-AC_CHECK_HEADERS([endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h])
+AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h])
 AC_SEARCH_LIBS([getaddrinfo_a], [anl], [AC_DEFINE(HAVE_GETADDRINFO_A, 1, [Define this symbol if you have getaddrinfo_a])])
 AC_SEARCH_LIBS([inet_pton], [nsl resolv], [AC_DEFINE(HAVE_INET_PTON, 1, [Define this symbol if you have inet_pton])])
 
@@ -447,6 +447,8 @@ AC_CHECK_DECLS([strnlen])
 AC_CHECK_DECLS([le16toh, le32toh, le64toh, htole16, htole32, htole64, be16toh, be32toh, be64toh, htobe16, htobe32, htobe64],,,
                [#if HAVE_ENDIAN_H
                  #include <endian.h>
+                 #elif HAVE_SYS_ENDIAN_H
+                 #include <sys/endian.h>
                  #endif])
 
 AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64],,,
index 4d041d655411738476ecbc1e5c96e845452d8b8f..9fec2a07faba5a7d06d7cda2e26fee898e344fb0 100644 (file)
@@ -15,6 +15,8 @@
 
 #if defined(HAVE_ENDIAN_H)
 #include <endian.h>
+#elif defined(HAVE_SYS_ENDIAN_H)
+#include <sys/endian.h>
 #endif
 
 #if defined(WORDS_BIGENDIAN)
This page took 0.028953 seconds and 4 git commands to generate.