summaryrefslogtreecommitdiffstats
path: root/include/gmputil.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gmputil.h')
-rw-r--r--include/gmputil.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/gmputil.h b/include/gmputil.h
index 88be697a..63eb0ba9 100644
--- a/include/gmputil.h
+++ b/include/gmputil.h
@@ -2,12 +2,21 @@
#define NFTABLES_GMPUTIL_H
#include <gmp.h>
+#include <asm/byteorder.h>
enum mpz_word_order {
MPZ_MSWF = 1,
MPZ_LSWF = -1,
};
+#ifdef __LITTLE_ENDIAN_BITFIELD
+#define MPZ_HWO MPZ_LSWF
+#elif defined(__BIG_ENDIAN_BITFIELD)
+#define MPZ_HWO MPZ_MSWF
+#else
+#error "byteorder undefined"
+#endif
+
enum mpz_byte_order {
MPZ_BIG_ENDIAN = 1,
MPZ_HOST_ENDIAN = 0,