DORMANTno replies

[PATCH] ipstats: Define MIN function to fix undefined references

From: Nick Hainke <hidden>
Date: 2022-08-06 08:27:32
Subsystem: the rest · Maintainer: Linus Torvalds

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

Signed-off-by: Nick Hainke <redacted>
---
 ip/ipstats.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/ip/ipstats.c b/ip/ipstats.c
index 5cdd15ae..2f500fc8 100644
--- a/ip/ipstats.c
+++ b/ip/ipstats.c
@@ -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.
-- 
2.37.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help