]> git.neil.brown.name Git - wiggle.git/commitdiff
config.h: include different endian file for OS/X
authorNeilBrown <neilb@suse.de>
Thu, 17 May 2012 07:20:07 +0000 (17:20 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 17 May 2012 07:20:07 +0000 (17:20 +1000)
It seems that some OS/X users don't need any endian file, and
others need machine/endian.h
Odd, but we can satisfy both, so do so.

Patch-from: "P. Martin" <mrsmiley98@lycos.com>
Signed-off-by: NeilBrown <neilb@suse.de>
config.h

index 0109c4ae75d69b5e3b6692ff8a7fe78ed84a0cfa..c574f5f41f04054812edba27195cda89f11bc291 100644 (file)
--- a/config.h
+++ b/config.h
@@ -2,7 +2,11 @@
 /* Includes and defines for ccan files */
 
 #if !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
- #include <endian.h>
+ #ifdef __APPLE__
+  #include <machine/endian.h>
+ #else
+  #include <endian.h>
+ #endif
 #endif
 #ifdef LITTLE_ENDIAN
  #define HAVE_LITTLE_ENDIAN 1