From 5bbf332b1b9dd1482fd203668ed12b18a5981783 Mon Sep 17 00:00:00 2001 From: Erik Kundiman <erik@megapahit.org> Date: Fri, 21 Jul 2023 22:16:30 +0800 Subject: Fix FreeBSD login problem by checking endianness Even though the account was logged in, it would get stuck at getting region handshake. The problem was because the viewer wasn't getting the acknowledgement to the successfully sent UseCircuitCode message. I compared the message data, and it differed (from Linux) on the byte order of the Code variable (the SessionID & agent ID were right). The bytes sent to the network weren't reversed (and I was on an Intel processor). --- indra/llcommon/llpreprocessor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index 5df5dd8302..3c05fd32da 100644 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -32,9 +32,11 @@ #ifdef LL_LINUX #define __ENABLE_WSTRING #include <endian.h> +#elif defined(LL_FREEBSD) +#include <sys/endian.h> #endif // LL_LINUX -#if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__))) +#if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__)) || (defined(LL_FREEBSD) && (_BYTE_ORDER == _LITTLE_ENDIAN))) #define LL_LITTLE_ENDIAN 1 #else #define LL_BIG_ENDIAN 1 -- cgit v1.2.3