Commit cbe325749ff71189f0bfcb706feff28787a2c372

Con Kolivas 2014-02-15T17:14:40

Add le16toh defines for platforms that may be missing it.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/miner.h b/miner.h
index 334ba77..872365f 100644
--- a/miner.h
+++ b/miner.h
@@ -160,6 +160,7 @@ static inline int fsync (int fd)
 #ifndef htobe32
 # if __BYTE_ORDER == __LITTLE_ENDIAN
 #  define htole16(x) (x)
+#  define le16toh(x) (x)
 #  define htole32(x) (x)
 #  define htole64(x) (x)
 #  define le32toh(x) (x)
@@ -170,6 +171,7 @@ static inline int fsync (int fd)
 #  define htobe64(x) bswap_64(x)
 # elif __BYTE_ORDER == __BIG_ENDIAN
 #  define htole16(x) bswap_16(x)
+#  define le16toh(x) bswap_16(x)
 #  define htole32(x) bswap_32(x)
 #  define le32toh(x) bswap_32(x)
 #  define le64toh(x) bswap_64(x)