From 40ec3b2bfce5d556bb9dcd70d82b0d38dd225502 Mon Sep 17 00:00:00 2001 From: Joel Linn Date: Sat, 22 May 2021 19:31:23 +0200 Subject: [PATCH] Fix MinGW compilation - Fixed syntax error in platform independent bswap_64 implementation --- src/google/protobuf/stubs/port.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h index eec96faf38..bead0af743 100644 --- a/src/google/protobuf/stubs/port.h +++ b/src/google/protobuf/stubs/port.h @@ -263,14 +263,14 @@ static inline uint32 bswap_32(uint32 x) { #ifndef bswap_64 static inline uint64 bswap_64(uint64 x) { - return (((x & uint64_t{0xFFu)) << 56) | - ((x & uint64_t{0xFF00u)) << 40) | - ((x & uint64_t{0xFF0000u)) << 24) | - ((x & uint64_t{0xFF000000u)) << 8) | - ((x & uint64_t{0xFF00000000u)) >> 8) | - ((x & uint64_t{0xFF0000000000u)) >> 24) | - ((x & uint64_t{0xFF000000000000u)) >> 40) | - ((x & uint64_t{0xFF00000000000000u)) >> 56)); + return (((x & uint64_t{0xFFu}) << 56) | + ((x & uint64_t{0xFF00u}) << 40) | + ((x & uint64_t{0xFF0000u}) << 24) | + ((x & uint64_t{0xFF000000u}) << 8) | + ((x & uint64_t{0xFF00000000u}) >> 8) | + ((x & uint64_t{0xFF0000000000u}) >> 24) | + ((x & uint64_t{0xFF000000000000u}) >> 40) | + ((x & uint64_t{0xFF00000000000000u}) >> 56)); } #define bswap_64(x) bswap_64(x) #endif