Skip to contentSkip to conversation

intervals: fix compilation --with-mini-gmp

PATCH New Pablo Neira Ayuso 1 participant 1 message May 30, 2022 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 intervals: fix compilation --with-mini-gmp

Use pr_gmp_debug() instead to compile with minigmp.

intervals.c: In function ‘set_delete’:
intervals.c:489:25: warning: implicit declaration of function ‘gmp_printf’; did you mean ‘gmp_vfprintf’? [-Wimplicit-function-declaration]

  489 |                         gmp_printf("remove: [%Zx-%Zx]\n",
      |                         ^~~~~~~~~~
      |                         gmp_vfprintf
---
 src/intervals.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
src/intervals.c +6 -6
index e61adc769c41..bc414d6c8797 100644
@@ -486,14 +486,14 @@ int set_delete(struct list_head *msgs, struct cmd *cmd, struct set *set,
 
 	if (debug_mask & NFT_DEBUG_SEGTREE) {
 		list_for_each_entry(i, &init->expressions, list)
-			gmp_printf("remove: [%Zx-%Zx]\n",
-				   i->key->left->value, i->key->right->value);
+			pr_gmp_debug("remove: [%Zx-%Zx]\n",
+				     i->key->left->value, i->key->right->value);
 		list_for_each_entry(i, &add->expressions, list)
-			gmp_printf("add: [%Zx-%Zx]\n",
-				   i->key->left->value, i->key->right->value);
+			pr_gmp_debug("add: [%Zx-%Zx]\n",
+				     i->key->left->value, i->key->right->value);
 		list_for_each_entry(i, &existing_set->init->expressions, list)
-			gmp_printf("existing: [%Zx-%Zx]\n",
-				   i->key->left->value, i->key->right->value);
+			pr_gmp_debug("existing: [%Zx-%Zx]\n",
+				     i->key->left->value, i->key->right->value);
 	}
 
 	if (list_empty(&add->expressions)) {
Signature · 1 line
2.30.2