commit:     56f9a5d07c39ce39d1e66af44bdcb370071e48de
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 23 16:25:59 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Mar 23 16:25:59 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=56f9a5d0

hash_fd: induce byteorder on Solaris too

 libq/hash_fd.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/libq/hash_fd.c b/libq/hash_fd.c
index 49e3af5..a88d756 100644
--- a/libq/hash_fd.c
+++ b/libq/hash_fd.c
@@ -31,7 +31,17 @@
 #ifdef HAVE_SYS_PARAM_H
 # include <sys/param.h>
 # ifndef __BYTE_ORDER
-#  define __BYTE_ORDER BYTE_ORDER
+#  ifdef BYTE_ORDER
+#   define __BYTE_ORDER BYTE_ORDER
+#  elif defined(_LITTLE_ENDIAN)
+#   define __LITTLE_ENDIAN 1234
+#   define __BIG_ENDIAN 4321
+#   define __BYTE_ORDER __LITTLE_ENDIAN
+#  elif defined(_BIG_ENDIAN)
+#   define __LITTLE_ENDIAN 1234
+#   define __BIG_ENDIAN 4321
+#   define __BYTE_ORDER __BIG_ENDIAN
+#  endif
 # endif
 # ifndef __BIG_ENDIAN
 #  define __BIG_ENDIAN BIG_ENDIAN

Reply via email to