From 86b7f28d6c507155a9d3a15487ee883989b88943 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Tue, 27 Feb 2024 18:39:22 +0000 Subject: 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. --- src/i2p.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/i2p.cpp') diff --git a/src/i2p.cpp b/src/i2p.cpp index c891562d00..4b79a6826b 100644 --- a/src/i2p.cpp +++ b/src/i2p.cpp @@ -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; -- cgit v1.2.3