summaryrefslogtreecommitdiffstats
path: root/include/utils.h
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2015-01-08 07:54:34 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2015-01-08 12:23:13 +0100
commitb3529cf43bba5c3c4cddefa7f5d0143d510fd3ec (patch)
tree20bb09a946f083601714a3fa38aab99c1f5fdbb7 /include/utils.h
parentc434c709e0a8e0ca2aa92ad139b61025173ae033 (diff)
build: add --with-mini-gmp switch to disable linking libgmp
This allows to disable linking the >400 KB big libgmp and replace it with the builtin mini-gmp which only increases size by ~30KB. Enabling this selectively decreases debugging verbosity (pr_debug). Signed-off-by: Steven Barth <cyrus@openwrt.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/utils.h')
-rw-r--r--include/utils.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/utils.h b/include/utils.h
index 45cb5a70..dcefc6b6 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -9,14 +9,14 @@
#include <unistd.h>
#include <assert.h>
#include <list.h>
-#include <gmp.h>
+#include <gmputil.h>
#define BITS_PER_BYTE 8
-#ifdef DEBUG
+#if defined(DEBUG) && defined(HAVE_LIBGMP)
#define pr_debug(fmt, arg...) gmp_printf(fmt, ##arg)
#else
-#define pr_debug(fmt, arg...) ({ if (false) gmp_printf(fmt, ##arg); 0; })
+#define pr_debug(fmt, arg...) ({ if (false) {}; 0; })
#endif
#define __fmtstring(x, y) __attribute__((format(printf, x, y)))