aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/tools
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2020-08-07 16:03:55 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2020-08-07 16:03:55 +0000
commitec4deee4e4f2aef1b97d9424f25d04e91fd7dc10 (patch)
tree3febc852497d63cfd3b5951bb9df06bc36cc6c6d /cddl/contrib/opensolaris/tools
parent88d241831d991f7c79242bf0bfe034541d373951 (diff)
downloadsrc-ec4deee4e4f2aef1b97d9424f25d04e91fd7dc10.tar.gz
src-ec4deee4e4f2aef1b97d9424f25d04e91fd7dc10.zip
Fix cddl tools bootstrapping on macOS and Linux
Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D25979
Notes
Notes: svn path=/head/; revision=364022
Diffstat (limited to 'cddl/contrib/opensolaris/tools')
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h b/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h
index c8d272faa419..b7da16ac3ddd 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h
@@ -38,6 +38,7 @@
#include <pthread.h>
#include <sys/ccompile.h>
+#include <sys/endian.h>
#ifdef __cplusplus
extern "C" {
@@ -65,6 +66,15 @@ extern "C" {
#define MIN(a, b) ((a) > (b) ? (b) : (a))
#endif
+/* Sanity check for cross-build bootstrap tools */
+#if !defined(BYTE_ORDER)
+#error "Missing BYTE_ORDER defines"
+#elif !defined(_LITTLE_ENDIAN)
+#error "Missing _LITTLE_ENDIAN defines"
+#elif !defined(_BIG_ENDIAN)
+#error "Missing _BIG_ENDIAN defines"
+#endif
+
#define TRUE 1
#define FALSE 0