fix: Fix missing htonll definition when building for Windows

This commit is contained in:
Kim, Hwan
2025-02-20 08:24:31 +09:00
committed by F. Duncanh
parent 79ff1411d8
commit c864b46981

View File

@@ -31,6 +31,9 @@
# ifndef ntonll
# define ntohll(x) ((1==ntohl(1)) ? (x) : (((uint64_t)ntohl((x) & 0xFFFFFFFFUL)) << 32) | ntohl((uint32_t)((x) >> 32)))
# endif
#ifndef htonll
# define htonll(x) ((1==htonl(1)) ? (x) : (((uint64_t)htonl((x) & 0xFFFFFFFFUL)) << 32) | htonl((uint32_t)((x) >> 32)))
#endif
#else
# ifndef htonll
# ifdef SYS_ENDIAN_H