summaryrefslogtreecommitdiffstats
path: root/include/gmputil.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2017-11-22 20:21:04 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2017-11-22 20:38:11 +0100
commit932847e0c3df8f6ee3dc4478f1ef0728926d9544 (patch)
tree6225de85adc157ff7fdc1731901b60cfd400bafa /include/gmputil.h
parent9a74945c626290cf8a394436f45da2b3e69401b6 (diff)
gmputil: turn mpz_printf into mpz_vfprintf to restore --with-mini-gmp
2535ba7006f2 ("src: get rid of printf") uses gmp_vfprintf() which doesn't exists in mini-gmp.c, this breaks compilation with --mini-gmp. This patch implements poor man's gmp_vfprintf that takes one single argument which is what we need. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/gmputil.h')
-rw-r--r--include/gmputil.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/gmputil.h b/include/gmputil.h
index 9c372216..084aa622 100644
--- a/include/gmputil.h
+++ b/include/gmputil.h
@@ -7,9 +7,10 @@
#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
+#include <stdio.h>
+/* mini-gmp doesn't come with gmp_vfprintf, so we use our own minimal variant */
+extern int mpz_vfprintf(FILE *fp, const char *format, va_list args);
+#define gmp_vfprintf mpz_vfprintf
#endif
#include <asm/byteorder.h>