serialization: use internal endian conversion functions

These replace our platform-specific mess in favor of c++20 endian detection
via std::endian and internal byteswap functions when necessary.

They no longer rely on autoconf detection.
This commit is contained in:
Cory Fields
2024-02-27 18:39:22 +00:00
parent 432b18ca8d
commit 86b7f28d6c
5 changed files with 64 additions and 238 deletions

View File

@@ -392,7 +392,7 @@ Binary Session::MyDestination() const
}
memcpy(&cert_len, &m_private_key.at(CERT_LEN_POS), sizeof(cert_len));
cert_len = be16toh(cert_len);
cert_len = be16toh_internal(cert_len);
const size_t dest_len = DEST_LEN_BASE + cert_len;