From f763a2a86084371fd0da95f3eeb879c2ff26b06d Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Sat, 17 Apr 2021 01:54:20 +0300 Subject: [PATCH] Use byteswap.h when building against musl libc (#8503) --- src/google/protobuf/stubs/port.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h index 0f3b5aa628c..6badd3ff631 100644 --- a/src/google/protobuf/stubs/port.h +++ b/src/google/protobuf/stubs/port.h @@ -78,7 +78,7 @@ #include #elif defined(__APPLE__) #include -#elif defined(__GLIBC__) || defined(__BIONIC__) || defined(__CYGWIN__) +#elif defined(__linux__) || defined(__ANDROID__) || defined(__CYGWIN__) #include // IWYU pragma: export #endif @@ -242,7 +242,7 @@ inline void GOOGLE_UNALIGNED_STORE64(void *p, uint64 v) { #define bswap_32(x) OSSwapInt32(x) #define bswap_64(x) OSSwapInt64(x) -#elif !defined(__GLIBC__) && !defined(__BIONIC__) && !defined(__CYGWIN__) +#elif !defined(__linux__) && !defined(__ANDROID__) && !defined(__CYGWIN__) #ifndef bswap_16 static inline uint16 bswap_16(uint16 x) {