From 4cc160e1961a7abcd236b37c804774f7ef743eaa Mon Sep 17 00:00:00 2001 From: ramrunner Date: Mon, 5 Dec 2016 16:58:58 -0700 Subject: when on OpenBSD we include the correct headers for endianess and check the apropriate defines --- src/google/protobuf/stubs/port.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h index 376be5f7..d5ef166e 100644 --- a/src/google/protobuf/stubs/port.h +++ b/src/google/protobuf/stubs/port.h @@ -60,8 +60,12 @@ #endif #else #include // __BYTE_ORDER + #if defined(__OpenBSD__) + #include + #endif #if ((defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \ - (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN)) && \ + (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) || \ + (defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN)) && \ !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) #define PROTOBUF_LITTLE_ENDIAN 1 #endif -- cgit v1.2.3