Browse Source

Bugfix: Need to ensure __BIG_ENDIAN__ is defined before including uthash.h

Luke Dashjr 13 years ago
parent
commit
d8c1d8d7bc
1 changed files with 5 additions and 5 deletions
  1. 5 5
      miner.h

+ 5 - 5
miner.h

@@ -13,6 +13,11 @@
 #include <blkmaker.h>
 #include <blkmaker.h>
 #include <blktemplate.h>
 #include <blktemplate.h>
 
 
+#if defined(WORDS_BIGENDIAN) && !defined(__BIG_ENDIAN__)
+/* uthash.h depends on __BIG_ENDIAN__ on BE platforms */
+#define __BIG_ENDIAN__ 1
+#endif
+
 #include "elist.h"
 #include "elist.h"
 #include "uthash.h"
 #include "uthash.h"
 #include "logging.h"
 #include "logging.h"
@@ -136,11 +141,6 @@ static inline int fsync (int fd)
  	(uint64_t)bswap_32((uint32_t)((value) >> 32)))
  	(uint64_t)bswap_32((uint32_t)((value) >> 32)))
 #endif
 #endif
 
 
-#if defined(WORDS_BIGENDIAN) && !defined(__BIG_ENDIAN__)
-/* uthash.h depends on __BIG_ENDIAN__ on BE platforms */
-#define __BIG_ENDIAN__ 1
-#endif
-
 /* This assumes htobe32 is a macro and that if it doesn't exist, then the
 /* This assumes htobe32 is a macro and that if it doesn't exist, then the
  * also won't exist */
  * also won't exist */
 #ifndef htobe32
 #ifndef htobe32