]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix build on Darwin. Patch by Rich Coe (rcoe@wi.rr.com).
authorFlorian Krohm <florian@eich-krohm.de>
Thu, 30 Aug 2012 15:12:59 +0000 (15:12 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Thu, 30 Aug 2012 15:12:59 +0000 (15:12 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12917

memcheck/tests/vbit-test/util.c
memcheck/tests/vbit-test/vbits.c

index bc78e1b32119f22625cad570a357fe145534e28c..4aa62b9485bbfc58c4495233540148e2b44c0762 100644 (file)
@@ -3,7 +3,13 @@
 #include <stdio.h>     // fprintf
 #include <stdlib.h>    // exit
 #include <assert.h>    // assert
+#if defined(__APPLE__)
+#include <machine/endian.h>
+#define __BYTE_ORDER    BYTE_ORDER
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#else
 #include <endian.h>
+#endif
 #include <inttypes.h>
 #include "vtest.h"
 
index d55d444a5b8c90b0fb56dfa284d034d9b5ce5841..503d8493e50f89ef708c042a586948dbe2ff45da 100644 (file)
@@ -2,7 +2,13 @@
 
 #include <stdio.h>   // fprintf
 #include <assert.h>  // assert
-#include <endian.h>  // __BYTE_ORDER
+#if defined(__APPLE__)
+#include <machine/endian.h>
+#define __BYTE_ORDER    BYTE_ORDER
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#else
+#include <endian.h>
+#endif
 #include <inttypes.h>
 #include "vbits.h"
 #include "vtest.h"