diff options
author | Trevor Gamblin <tgamblin@baylibre.com> | 2023-07-20 16:37:26 -0400 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2023-07-24 18:24:52 -0700 |
commit | 9d82667cc9d2f10738fa88442ee0a05afd9c1119 (patch) | |
tree | bb921465c031972ec366ffc351f751b359a22072 | |
parent | 58c2530c7efecc568127f0ca3764576c22c38cc9 (diff) | |
download | iproute2-9d82667cc9d2f10738fa88442ee0a05afd9c1119.tar.gz |
bridge/mdb.c: include limits.h
While building iproute2 6.4.0 with musl using Yocto Project, errors such
as the following were encountered:
| mdb.c: In function 'mdb_parse_vni':
| mdb.c:666:47: error: 'ULONG_MAX' undeclared (first use in this function)
| 666 | if ((endptr && *endptr) || vni_num == ULONG_MAX)
| | ^~~~~~~~~
| mdb.c:666:47: note: 'ULONG_MAX' is defined in header '<limits.h>'; did you forget to '#include <limits.h>'?
Include limits.h in bridge/mdb.c to fix this issue. This change is based
on one in Alpine Linux, but the author there had no plans to submit:
https://git.alpinelinux.org/aports/commit/main/iproute2/include.patch?id=bd46efb8a8da54948639cebcfa5b37bd608f1069
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
-rw-r--r-- | bridge/mdb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bridge/mdb.c b/bridge/mdb.c index fbb4f7040..18793458e 100644 --- a/bridge/mdb.c +++ b/bridge/mdb.c @@ -15,6 +15,7 @@ #include <string.h> #include <arpa/inet.h> #include <netdb.h> +#include <limits.h> #include "libnetlink.h" #include "utils.h" |