From 9a7b672d6e1be6f4960dca7e46f73f6f30bba940 Mon Sep 17 00:00:00 2001 From: Paul-Louis Ageneau Date: Wed, 7 Apr 2021 15:50:11 +0200 Subject: [PATCH] Fixed htonll fallback implementation --- include/rtc/rtp.hpp | 2 +- src/impl/wstransport.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/rtc/rtp.hpp b/include/rtc/rtp.hpp index 20326ee..88a9099 100644 --- a/include/rtc/rtp.hpp +++ b/include/rtc/rtp.hpp @@ -33,7 +33,7 @@ #ifndef htonll #define htonll(x) \ - ((uint64_t)htonl(((uint64_t)(x)&0xFFFFFFFF) << 32) | (uint64_t)htonl((uint64_t)(x) >> 32)) + ((uint64_t)(((uint64_t)htonl((uint32_t)(x))) << 32) | (uint64_t)htonl((uint32_t)((x) >> 32))) #endif #ifndef ntohll #define ntohll(x) htonll(x) diff --git a/src/impl/wstransport.cpp b/src/impl/wstransport.cpp index cf16986..e817418 100644 --- a/src/impl/wstransport.cpp +++ b/src/impl/wstransport.cpp @@ -39,7 +39,7 @@ #ifndef htonll #define htonll(x) \ - ((uint64_t)htonl(((uint64_t)(x)&0xFFFFFFFF) << 32) | (uint64_t)htonl((uint64_t)(x) >> 32)) + ((uint64_t)(((uint64_t)htonl((uint32_t)(x))) << 32) | (uint64_t)htonl((uint32_t)((x) >> 32))) #endif #ifndef ntohll #define ntohll(x) htonll(x)