42 lines
1.2 KiB
Diff
42 lines
1.2 KiB
Diff
From 3a1ab01be4af79136081f4977b3eaa6ff3eb0d3e Mon Sep 17 00:00:00 2001
|
|
From: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
|
|
Date: Mon, 6 Jan 2014 03:57:03 +0000
|
|
Subject: [PATCH] Fix endian checks as per austin group definitions of endian.h
|
|
|
|
Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733831
|
|
Reference: http://www.opengroup.org/austin/docs/austin_514.txt
|
|
|
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
---
|
|
config.h | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/config.h b/config.h
|
|
index ecf3411..79a64b5 100644
|
|
--- a/config.h
|
|
+++ b/config.h
|
|
@@ -1,17 +1,17 @@
|
|
|
|
/* Includes and defines for ccan files */
|
|
|
|
-#if !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
|
|
+#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
|
|
--
|
|
2.1.4
|
|
|