Skip to content

Commit a5eb7e0

Browse files
authored
Merge pull request libgit2#5612 from mmuman/haiku
deps: ntlmclient: fix htonll for Haiku
2 parents 8e3f882 + 9291362 commit a5eb7e0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

deps/ntlmclient/compat.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
# include <stdbool.h>
2222
#endif
2323

24-
#ifdef __linux__
24+
#if defined(_WIN32) || defined(__APPLE__)
25+
/* winsock and macOS > 10.9 have htonll already */
26+
#elif defined(__linux__)
2527
/* See man page endian(3) */
2628
# include <endian.h>
2729
# define htonll htobe64
@@ -46,6 +48,11 @@
4648
# define htonll(x) ((((uint64_t)htonl(x)) << 32) + htonl((uint64_t)(x) >> 32))
4749
# endif
4850
# endif
51+
#elif defined(__HAIKU__)
52+
# include <ByteOrder.h>
53+
# define htonll B_HOST_TO_BENDIAN_INT64
54+
#else
55+
# error "Please implement htonll for your platform"
4956
#endif
5057

5158
#ifndef MIN

0 commit comments

Comments
 (0)