Skip to content

Commit b8e5b0c

Browse files
committed
fix(windows): non existing htonll
1 parent a6ebf30 commit b8e5b0c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cloudsync.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,15 @@
3636
#define htonll(x) (x)
3737
#define ntohll(x) (x)
3838
#else
39+
#ifndef htobe64
40+
#define htonll(x) ((uint64_t)htonl((x) & 0xFFFFFFFF) << 32 | (uint64_t)htonl((x) >> 32))
41+
#define ntohll(x) ((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32 | (uint64_t)ntohl((x) >> 32))
42+
#else
3943
#define htonll(x) htobe64(x)
4044
#define ntohll(x) be64toh(x)
4145
#endif
4246
#endif
47+
#endif
4348

4449
#ifndef CLOUDSYNC_OMIT_NETWORK
4550
#include "network.h"

0 commit comments

Comments
 (0)