summaryrefslogtreecommitdiffstats
path: root/include/gmputil.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gmputil.h')
-rw-r--r--include/gmputil.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/gmputil.h b/include/gmputil.h
index 63eb0ba9..1bf696a5 100644
--- a/include/gmputil.h
+++ b/include/gmputil.h
@@ -1,7 +1,17 @@
#ifndef NFTABLES_GMPUTIL_H
#define NFTABLES_GMPUTIL_H
+#include <config.h>
+
+#ifdef HAVE_LIBGMP
#include <gmp.h>
+#else
+#include <mini-gmp.h>
+/* mini-gmp doesn't come with gmp_printf, so we use our own minimal variant */
+extern int mpz_printf(const char *format, const mpz_t value);
+#define gmp_printf mpz_printf
+#endif
+
#include <asm/byteorder.h>
enum mpz_word_order {