diff options
author | Dimitri John Ledkov <dimitri.ledkov@canonical.com> | 2014-01-06 05:18:14 +0000 |
---|---|---|
committer | Dimitri John Ledkov <dimitri.ledkov@canonical.com> | 2014-01-06 05:18:14 +0000 |
commit | a02f87ea97fd10e820969f33b8167b80e37ee0bb (patch) | |
tree | ddb9536b1f9b8ab93b15b8f423450207647b27fc /config.h | |
parent | b4b24000fc06b35a9c20df920f58eff067dc8643 (diff) |
Fix big-endian FTBFS (Closes: #733831)HEADdebian/0.9.1-1.1master
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1,13 +1,17 @@ /* Includes and defines for ccan files */ -#if !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN) - #include <endian.h> +#if !defined(BYTE_ORDER) && !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN) + #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) + #include <machine/endian.h> + #else + #include <endian.h> + #endif #endif -#ifdef LITTLE_ENDIAN +#if BYTE_ORDER == LITTLE_ENDIAN #define HAVE_LITTLE_ENDIAN 1 #define HAVE_BIG_ENDIAN 0 -#elif defined(BIG_ENDIAN) +#elif BYTE_ORDER == BIG_ENDIAN #define HAVE_LITTLE_ENDIAN 0 #define HAVE_BIG_ENDIAN 1 #else |