netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trevor Gamblin <tgamblin@baylibre.com>
To: netdev@vger.kernel.org
Subject: [PATCH iproute2] bridge/mdb.c: include limits.h
Date: Thu, 20 Jul 2023 16:37:26 -0400	[thread overview]
Message-ID: <20230720203726.2316251-1-tgamblin@baylibre.com> (raw)

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>
---
 bridge/mdb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bridge/mdb.c b/bridge/mdb.c
index fbb4f704..18793458 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"
-- 
2.41.0


             reply	other threads:[~2023-07-20 20:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 20:37 Trevor Gamblin [this message]
2023-07-23  7:31 ` [PATCH iproute2] bridge/mdb.c: include limits.h Ido Schimmel
2023-07-25  1:40 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230720203726.2316251-1-tgamblin@baylibre.com \
    --to=tgamblin@baylibre.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).