Skip to content

Commit e55af9e

Browse files
committed
Merge branch 'fix-build-on-solaris' from avsej
This backports a patch originally submitted as vysheng/tl-parser#10
2 parents c1729d3 + 4e8c23c commit e55af9e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

portable_endian.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,24 @@
4949

5050
# include <sys/endian.h>
5151

52+
#elif defined(__sun)
53+
54+
# include <sys/byteorder.h>
55+
# define htobe16(x) BE_16(x)
56+
# define htole16(x) LE_16(x)
57+
# define be16toh(x) BE_IN16(x)
58+
# define le16toh(x) LE_IN16(x)
59+
60+
# define htobe32(x) BE_32(x)
61+
# define htole32(x) LE_32(x)
62+
# define be32toh(x) BE_IN32(x)
63+
# define le32toh(x) LE_IN32(x)
64+
65+
# define htobe64(x) BE_64(x)
66+
# define htole64(x) LE_64(x)
67+
# define be64toh(x) BE_IN64(x)
68+
# define le64toh(x) LE_IN64(x)
69+
5270
#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
5371

5472
# include <sys/endian.h>

0 commit comments

Comments
 (0)