summaryrefslogtreecommitdiff
path: root/solenv/bin
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-12-12 12:49:49 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-12-14 11:07:54 +0000
commitf0cf5557d7e309e84ec997b8bdd84c6d029271d2 (patch)
tree07627797a99a48aaa887c90c4a9955a3dfb1862e /solenv/bin
parent3a8b00910e0dbcad29e8af74f3ab1dff4645e867 (diff)
Fix build on BSDs
Change-Id: I88fbad89a78262f4c3275aa3a01fbebaacece245 Reviewed-on: https://gerrit.libreoffice.org/20660 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'solenv/bin')
-rw-r--r--solenv/bin/concat-deps.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c
index 4e6b432982ec..2b5956f5227f 100644
--- a/solenv/bin/concat-deps.c
+++ b/solenv/bin/concat-deps.c
@@ -33,9 +33,7 @@
#define CORE_LITTLE_ENDIAN
#endif /* Def _MSC_VER */
-#if defined(__linux) || defined(__OpenBSD__) || \
- defined(__FreeBSD__) || defined(__NetBSD__) || \
- defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+#if defined(__linux) || defined(__FreeBSD_kernel__)
#include <sys/param.h>
#if __BYTE_ORDER == __LITTLE_ENDIAN
#undef CORE_BIG_ENDIAN
@@ -46,7 +44,21 @@
#undef CORE_LITTLE_ENDIAN
#endif /* __BYTE_ORDER == __BIG_ENDIAN */
#endif /* !(__BYTE_ORDER == __LITTLE_ENDIAN) */
-#endif /* Def __linux || Def *BSD */
+#endif /* Def __linux */
+
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || \
+ defined(__NetBSD__) || defined(__DragonFly__)
+#include <machine/endian.h>
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+#undef CORE_BIG_ENDIAN
+#define CORE_LITTLE_ENDIAN
+#else /* !(_BYTE_ORDER == _LITTLE_ENDIAN) */
+#if _BYTE_ORDER == _BIG_ENDIAN
+#define CORE_BIG_ENDIAN
+#undef CORE_LITTLE_ENDIAN
+#endif /* _BYTE_ORDER == _BIG_ENDIAN */
+#endif /* !(_BYTE_ORDER == _LITTLE_ENDIAN) */
+#endif /* Def *BSD */
#ifdef __sun
#ifdef __sparc