diff --git a/cbits/bitfn.h b/cbits/bitfn.h
--- a/cbits/bitfn.h
+++ b/cbits/bitfn.h
@@ -158,8 +158,13 @@
 }
 #endif
 
+#ifdef __MINGW32__
+  # define LITTLE_ENDIAN 1234
+  # define BYTE_ORDER    LITTLE_ENDIAN
+#else
+  # include <endian.h>
+#endif
 /* big endian to cpu */
-#include <endian.h>
 #if LITTLE_ENDIAN == BYTE_ORDER
 
 # define be32_to_cpu(a) swap32(a)
diff --git a/cbits/skein256.c b/cbits/skein256.c
--- a/cbits/skein256.c
+++ b/cbits/skein256.c
@@ -42,7 +42,7 @@
 	uint64_t ts[3];
 	uint64_t ks[4+1];
 
-	ks[4] = 0x5555555555555555;
+	ks[4] = 0x5555555555555555ULL;
 	ks[0] = ctx->h[0]; ks[4] ^= ctx->h[0];
 	ks[1] = ctx->h[1]; ks[4] ^= ctx->h[1];
 	ks[2] = ctx->h[2]; ks[4] ^= ctx->h[2];
diff --git a/cbits/skein512.c b/cbits/skein512.c
--- a/cbits/skein512.c
+++ b/cbits/skein512.c
@@ -42,7 +42,7 @@
 	uint64_t ts[3];
 	uint64_t ks[8+1];
 
-	ks[8] = 0x5555555555555555;
+	ks[8] = 0x5555555555555555ULL;
 	ks[0] = ctx->h[0]; ks[8] ^= ctx->h[0];
 	ks[1] = ctx->h[1]; ks[8] ^= ctx->h[1];
 	ks[2] = ctx->h[2]; ks[8] ^= ctx->h[2];
diff --git a/cryptohash.cabal b/cryptohash.cabal
--- a/cryptohash.cabal
+++ b/cryptohash.cabal
@@ -1,5 +1,5 @@
 Name:                cryptohash
-Version:             0.5.1
+Version:             0.5.2
 Description:
     A collection of crypto hashes, with a practical incremental and one-pass, pure APIs,
     with performance close to the fastest implementations available in others languages.
