From ee797abf0b0145e3e4182be2321fba62a0793b93 Mon Sep 17 00:00:00 2001 From: Leonardo Alminana Date: Wed, 21 Aug 2024 16:16:49 +0200 Subject: [PATCH] core: replaced buggy cpu byte order detection with a reliable mechanism Signed-off-by: Leonardo Alminana --- include/fluent-bit/flb_endian.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/fluent-bit/flb_endian.h b/include/fluent-bit/flb_endian.h index b376ea84235..da21aef2b6e 100644 --- a/include/fluent-bit/flb_endian.h +++ b/include/fluent-bit/flb_endian.h @@ -55,9 +55,7 @@ #define FLB_BIG_ENDIAN 1 #ifndef FLB_BYTE_ORDER - #if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ - #define FLB_BYTE_ORDER FLB_BIG_ENDIAN - #elif defined(__BIG_ENDIAN__) || defined(__BIG_ENDIAN) || defined(_BIG_ENDIAN) + #ifdef FLB_HAVE_BIG_ENDIAN_SYSTEM #define FLB_BYTE_ORDER FLB_BIG_ENDIAN #else #define FLB_BYTE_ORDER FLB_LITTLE_ENDIAN