From: Francesco Paolo Lovergine <frankie@debian.org>
Date: Wed, 24 Apr 2024 16:18:21 +0800
Subject: Fix endianness definition.

Forwarded: not-needed

This is a Linux specific patch.
A better fix would check endianness at configuration time.
---
 vpflib/include/machine.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/vpflib/include/machine.h b/vpflib/include/machine.h
index 808522d..cee8774 100644
--- a/vpflib/include/machine.h
+++ b/vpflib/include/machine.h
@@ -15,10 +15,11 @@ typedef struct
     long            output;
 } xBYTE_ORDER;
 
-#if SYS_BIG_ENDIAN == 1
-#define MACHINE_BYTE_ORDER MOST_SIGNIFICANT
-#else
+#include <endian.h>
+#if __BYTE_ORDER == __LITTLE_ENDIAN
 #define MACHINE_BYTE_ORDER LEAST_SIGNIFICANT
+#elif __BYTE_ORDER == __BIG_ENDIAN
+#define MACHINE_BYTE_ORDER MOST_SIGNIFICANT
 #endif
 
 #ifdef _WINDOWS
