Skip to content

Commit c690136

Browse files
committed
deps: ntlmclient: fix htonll on big endian FreeBSD
In commit 3828ea6 (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.
1 parent a48da8f commit c690136

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/ntlmclient/compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#elif defined(__FreeBSD__)
3333
/* See man page bwaps64(9) */
3434
# include <sys/endian.h>
35-
# define htonll bswap64
35+
# define htonll htobe64
3636
#elif defined(sun) || defined(__sun)
3737
/* See man page byteorder(3SOCKET) */
3838
# include <sys/types.h>

0 commit comments

Comments
 (0)