From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: phil@nwl.cc
Subject: [PATCH nft 1/2] utils: fix one compilation error with --with-mini-gmp
Date: Wed, 22 Nov 2017 20:36:15 +0100 [thread overview]
Message-ID: <20171122193616.31755-1-pablo@netfilter.org> (raw)
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>
---
include/utils.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/utils.h b/include/utils.h
index 369195240e24..310389c22fab 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
--
2.11.0
next reply other threads:[~2017-11-22 19:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 19:36 Pablo Neira Ayuso [this message]
2017-11-22 19:36 ` [PATCH nft 2/2] gmputil: turn mpz_printf into mpz_vfprintf to restore --with-mini-gmp Pablo Neira Ayuso
2017-11-22 19:40 ` Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171122193616.31755-1-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).