am7xxx: MinGW does not have endian.h, provide fallbacks
authorAntonio Ospite <ospite@studenti.unina.it>
Thu, 10 May 2012 07:01:40 +0000 (09:01 +0200)
committerAntonio Ospite <ospite@studenti.unina.it>
Thu, 10 May 2012 13:57:59 +0000 (15:57 +0200)
Provide fallbacks only for the functions used in the code, and assume
Windows is always using little endian.

src/serialize.c

index be300ea..72e3fd4 100644 (file)
  */
 
 #include <string.h>
  */
 
 #include <string.h>
+
+#ifdef __MINGW32__
+#define le32toh(x) (x)
+#define htole32(x) (x)
+#else
 #include <endian.h>
 #include <endian.h>
+#endif
 
 #include "serialize.h"
 
 
 #include "serialize.h"