7bf55dd57b810f1d9fa18671fda2e9cbe6302a36
[openwrt/staging/aparcar.git] /
1 From c69e8e474936795a2cd7638b11ce3e99ff4d5ae7 Mon Sep 17 00:00:00 2001
2 From: Nick Hainke <vincent@systemli.org>
3 Date: Sat, 6 Aug 2022 10:00:20 +0200
4 Subject: [PATCH] ipstats: Define MIN function to fix undefined references
5
6 Fixes errors in the form of:
7 in function `ipstats_show_64':
8 <artificial>:(.text+0x4e30): undefined reference to `MIN'
9
10 Signed-off-by: Nick Hainke <vincent@systemli.org>
11 ---
12 ip/ipstats.c | 4 ++++
13 1 file changed, 4 insertions(+)
14
15 --- a/ip/ipstats.c
16 +++ b/ip/ipstats.c
17 @@ -6,6 +6,10 @@
18 #include "utils.h"
19 #include "ip_common.h"
20
21 +#ifndef MIN
22 +#define MIN(a, b) ((a) < (b) ? (a) : (b))
23 +#endif
24 +
25 struct ipstats_stat_dump_filters {
26 /* mask[0] filters outer attributes. Then individual nests have their
27 * filtering mask at the index of the nested attribute.