Skip to content

Commit 0c09e2c

Browse files
ikeyasujmue
authored andcommitted
add be64toh
1 parent 36e8b49 commit 0c09e2c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ssl/os_port.h

+13
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,19 @@ extern "C" {
8282
#define hmac_sha1 ax_hmac_sha1
8383
#define hmac_md5 ax_hmac_md5
8484

85+
#ifndef be64toh
86+
# define __bswap_constant_64(x) \
87+
((((x) & 0xff00000000000000ull) >> 56) \
88+
| (((x) & 0x00ff000000000000ull) >> 40) \
89+
| (((x) & 0x0000ff0000000000ull) >> 24) \
90+
| (((x) & 0x000000ff00000000ull) >> 8) \
91+
| (((x) & 0x00000000ff000000ull) << 8) \
92+
| (((x) & 0x0000000000ff0000ull) << 24) \
93+
| (((x) & 0x000000000000ff00ull) << 40) \
94+
| (((x) & 0x00000000000000ffull) << 56))
95+
#define be64toh(x) __bswap_constant_64(x)
96+
#endif
97+
8598
void ax_wdt_feed();
8699

87100
#elif defined(WIN32)

0 commit comments

Comments
 (0)