diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-11-22 19:59:12 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-11-22 20:00:52 +0100 |
commit | 9a74945c626290cf8a394436f45da2b3e69401b6 (patch) | |
tree | 72deaeabd717bb9d2d6fa201b5661845b68ca2bd | |
parent | cd43e516d3a4301be9e993cce94a48624650bb37 (diff) |
utils: fix one compilation error with --with-mini-gmp
Restore some code that is needed, until we have a version of gmp_printf
that takes variable arguments.
In file included from ../include/utils.h:12:0,
from ../include/nftables.h:6,
from ../include/rule.h:5,
from segtree.c:15:
segtree.c: In function ‘ei_insert’:
../include/gmputil.h:12:20: error: too many arguments to function ‘mpz_printf’
#define gmp_printf mpz_printf
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | include/utils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/utils.h b/include/utils.h index 36919524..310389c2 100644 --- a/include/utils.h +++ b/include/utils.h @@ -15,7 +15,11 @@ #define pr_debug(fmt, arg...) printf(fmt, ##arg) +#if defined(HAVE_LIBGMP) #define pr_gmp_debug(fmt, arg...) gmp_printf(fmt, ##arg) +#else +#define pr_gmp_debug(fmt, arg...) ({ if (false) {}; 0; }) +#endif #define __fmtstring(x, y) __attribute__((format(printf, x, y))) #if 0 |