]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #29: Solaris 11.3 and missing symbols be64toh, htobe64.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 6 May 2019 07:26:23 +0000 (09:26 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 6 May 2019 07:26:23 +0000 (09:26 +0200)
cachedb/cachedb.c
doc/Changelog

index 5a179a2bb419b2524819eab68e9ef46d6b26dbd2..08389a4323d488ec8a5eaf6c1ceddbda2709fd1a 100644 (file)
 #  define be64toh(x) OSSwapBigToHostInt64(x)
 #endif
 
+/* Some compilers do not define __BYTE_ORDER__, like IBM XLC on AIX */
+#ifndef be64toh
+#if defined(__sun) || defined(_AIX)
+#  if __BIG_ENDIAN__
+#    define be64toh(n) (n)
+#    define htobe64(n) (n)
+#  else
+#    define be64toh(n) (((uint64_t)htonl((n) & 0xFFFFFFFF) << 32) | htonl((n) >> 32))
+#    define htobe64(n) (((uint64_t)htonl((n) & 0xFFFFFFFF) << 32) | htonl((n) >> 32))
+#  endif
+#endif
+#endif /* be64toh */
+
 /** the unit test testframe for cachedb, its module state contains
  * a cache for a couple queries (in memory). */
 struct testframe_moddata {
index d81c3ee4463f1d603780650a98f36b3ce751d8d0..d6eec9b2aa969affb7cc6749ef07990b179b97c2 100644 (file)
@@ -1,3 +1,6 @@
+6 May 2019: Wouter
+       - Fix #29: Solaris 11.3 and missing symbols be64toh, htobe64.
+
 2 May 2019: Wouter
        - contrib/fastrpz.patch updated for code changes, and with git diff.
        - Fix .gitignore, add pythonmod and dnstap generated files.