Skip to contentSkip to conversation

ipstats: Define MIN function to fix undefined references

PATCH New Nick Hainke 1 participant 1 message Aug 6, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipstats: Define MIN function to fix undefined references

Fixes errors in the form of:
in function `ipstats_show_64':
<artificial>:(.text+0x4e30): undefined reference to `MIN'

---
 ip/ipstats.c | 4 ++++
 1 file changed, 4 insertions(+)
ip/ipstats.c +4 -0
index 5cdd15ae..2f500fc8 100644
@@ -6,6 +6,10 @@
 #include "utils.h"
 #include "ip_common.h"
 
+#ifndef MIN
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
 struct ipstats_stat_dump_filters {
 	/* mask[0] filters outer attributes. Then individual nests have their
 	 * filtering mask at the index of the nested attribute.
Signature · 1 line
2.37.1