public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2] ipstats: Define MIN function to fix undefined references
@ 2022-08-06  8:24 Nick Hainke
  2022-08-17  2:03 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Hainke @ 2022-08-06  8:24 UTC (permalink / raw)
  To: netdev; +Cc: Nick Hainke

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

Signed-off-by: Nick Hainke <vincent@systemli.org>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-17  2:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-06  8:24 [PATCH iproute2] ipstats: Define MIN function to fix undefined references Nick Hainke
2022-08-17  2:03 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox