summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2020-02-26 19:34:49 +0100
committerPatrick Steinhardt <ps@pks.im>2020-02-26 19:34:49 +0100
commitc690136c78075cc95ea4f1b9578f8133136299ee (patch)
treeb9d20340215289ed13b18fcd819cf6443dc8deb3
parenta48da8fab662aaa77340a3e969ac0deec9d51731 (diff)
downloadlibgit2-c690136c78075cc95ea4f1b9578f8133136299ee.tar.gz
deps: ntlmclient: fix htonll on big endian FreeBSD
In commit 3828ea67b (deps: ntlmclient: fix missing htonll symbols on FreeBSD and SunOS, 2020-02-21), we've fixed compilation on BSDs due to missing `htonll` wrappers. While we are now using `htobe64` for both Linux and OpenBSD, we decided to use `bswap64` on FreeBSD. While correct on little endian systems, where we will swap from little- to big-endian, we will also do the swap on big endian systems. As a result, we do not use network byte order on such systems. Fix the issue by using htobe64, as well.
-rw-r--r--deps/ntlmclient/compat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/ntlmclient/compat.h b/deps/ntlmclient/compat.h
index 43bc86564..555fa3fe4 100644
--- a/deps/ntlmclient/compat.h
+++ b/deps/ntlmclient/compat.h
@@ -32,7 +32,7 @@
#elif defined(__FreeBSD__)
/* See man page bwaps64(9) */
# include <sys/endian.h>
-# define htonll bswap64
+# define htonll htobe64
#elif defined(sun) || defined(__sun)
/* See man page byteorder(3SOCKET) */
# include <sys/types.h>