diff --git a/protobuf-c-rpc/protobuf-c-rpc-client.c b/protobuf-c-rpc/protobuf-c-rpc-client.c index 0dd25a5..97190f7 100644 --- a/protobuf-c-rpc/protobuf-c-rpc-client.c +++ b/protobuf-c-rpc/protobuf-c-rpc-client.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "protobuf-c-rpc.h" #include "protobuf-c-rpc-data-buffer.h" @@ -435,7 +436,7 @@ grow_closure_array (ProtobufC_RPC_Client *client) static uint32_t uint32_to_le (uint32_t le) { -#if !defined(WORDS_BIGENDIAN) +#if BYTE_ORDER == LITTLE_ENDIAN return le; #else return (le << 24) | (le >> 24) diff --git a/protobuf-c-rpc/protobuf-c-rpc-server.c b/protobuf-c-rpc/protobuf-c-rpc-server.c index 110c0e3..654d0a7 100644 --- a/protobuf-c-rpc/protobuf-c-rpc-server.c +++ b/protobuf-c-rpc/protobuf-c-rpc-server.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "protobuf-c-rpc.h" #include "protobuf-c-rpc-data-buffer.h" @@ -280,7 +281,7 @@ free_server_request (ProtobufC_RPC_Server *server, static uint32_t uint32_to_le (uint32_t le) { -#if !defined(WORDS_BIGENDIAN) +#if BYTE_ORDER == LITTLE_ENDIAN return le; #else return (le << 24) | (le >> 24)