nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 35 lines 1.2 kB view raw
1From 85ca659a59ae5be6fc0824b0684967ec94727e2a Mon Sep 17 00:00:00 2001 2From: toonn <toonn@toonn.io> 3Date: Wed, 12 Jun 2024 11:39:35 +0000 4Subject: [PATCH] il_endian.h: Fix endian handling 5 6Based on https://sourceforge.net/p/resil/tickets/8/, which has also been 7incorporated in the MacPort for libdevil 1.7.8, 8https://trac.macports.org/export/154482/trunk/dports/devel/libdevil/files/patch-src-IL-include-il_endian.h.diff, 9but updated for the header included in release 1.8.0 of libdevil. 10--- 11 src-IL/include/il_endian.h | 6 +++++- 12 1 file changed, 5 insertions(+), 1 deletion(-) 13 14diff --git a/src-IL/include/il_endian.h b/src-IL/include/il_endian.h 15index c4e6d86..a3cd57f 100644 16--- a/src-IL/include/il_endian.h 17+++ b/src-IL/include/il_endian.h 18@@ -23,9 +23,13 @@ extern "C" { 19 #ifndef __BIG_ENDIAN__ 20 #define __BIG_ENDIAN__ 1 21 #endif 22+#else 23+#ifndef __LITTLE_ENDIAN__ 24+#define __LITTLE_ENDIAN__ 1 25+#endif 26 #endif 27 28-#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __BIG_ENDIAN__) \ 29+#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) \ 30 || (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)) 31 #undef __LITTLE_ENDIAN__ 32 #define Short(s) iSwapShort(s) 33-- 342.44.0 35