From 518cda206be8f0df3a1c22f33f88f092814dfcce Mon Sep 17 00:00:00 2001 From: WuGaoyin <33418845+WuGaoyin@users.noreply.github.com> Date: Fri, 3 Feb 2023 13:21:13 -0800 Subject: [PATCH] Fix the macro PROTOBUF_LITTLE_ENDIAN cannot be set correctly on the little endian QNX. (#11750) Fix the macro PROTOBUF_LITTLE_ENDIAN cannot be set correctly on the little endian QNX. Signed-off-by: wugaoyin <1132954336@qq.com> Closes #11750 COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/11750 from WuGaoyin:main 09ec1a19e9c2eaad7085fad81b7bc8648db40de1 PiperOrigin-RevId: 506979012 --- 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 d459a944469a0..31eb97862a231 100644 --- a/src/google/protobuf/stubs/port.h +++ b/src/google/protobuf/stubs/port.h @@ -67,11 +67,11 @@ #include // __BYTE_ORDER #elif defined(_AIX) || defined(__TOS_AIX__) #include // BYTE_ORDER +#elif defined(__QNX__) +#include // BYTE_ORDER #else -#if !defined(__QNX__) #include // __BYTE_ORDER #endif -#endif #if ((defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \ (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) || \ (defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN)) && \