Skip to content

Commit 44091f0

Browse files
authored
Add le32toh and htole32 for macOS (#6807)
1 parent 067f9d5 commit 44091f0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/tscore/ink_endian.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,14 @@ htobe32(uint32_t x)
6060
{
6161
return OSSwapHostToBigInt32(x);
6262
}
63+
inline uint32_t
64+
le32toh(uint32_t x)
65+
{
66+
return OSSwapLittleToHostInt32(x);
67+
}
68+
inline uint32_t
69+
htole32(uint32_t x)
70+
{
71+
return OSSwapHostToLittleInt32(x);
72+
}
6373
#endif

0 commit comments

Comments
 (0)