diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-07-21 22:16:30 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-07-22 07:44:41 +0800 |
commit | 5bbf332b1b9dd1482fd203668ed12b18a5981783 (patch) | |
tree | 0b3d47b4121b1657706e50e211f3fbc2f8467c37 /indra | |
parent | 90e240bc71bfc9bf8f80a4a0c49a2e048013cb24 (diff) |
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).
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llpreprocessor.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 |