netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] bridge/mdb.c: include limits.h
@ 2023-07-20 20:37 Trevor Gamblin
  2023-07-23  7:31 ` Ido Schimmel
  2023-07-25  1:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Trevor Gamblin @ 2023-07-20 20:37 UTC (permalink / raw)
  To: netdev

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


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

* Re: [PATCH iproute2] bridge/mdb.c: include limits.h
  2023-07-20 20:37 [PATCH iproute2] bridge/mdb.c: include limits.h Trevor Gamblin
@ 2023-07-23  7:31 ` Ido Schimmel
  2023-07-25  1:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Ido Schimmel @ 2023-07-23  7:31 UTC (permalink / raw)
  To: Trevor Gamblin; +Cc: netdev

On Thu, Jul 20, 2023 at 04:37:26PM -0400, Trevor Gamblin wrote:
> 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>

Fixes: c5b327e5707b ("bridge: mdb: Add destination VNI support")
Reviewed-by: Ido Schimmel <idosch@nvidia.com>

Similar change was done in commit dd9cc0ee81a6 ("iproute2: various
header include fixes for compiling with musl libc").

Thanks

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

* Re: [PATCH iproute2] bridge/mdb.c: include limits.h
  2023-07-20 20:37 [PATCH iproute2] bridge/mdb.c: include limits.h Trevor Gamblin
  2023-07-23  7:31 ` Ido Schimmel
@ 2023-07-25  1:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-07-25  1:40 UTC (permalink / raw)
  To: Trevor Gamblin; +Cc: netdev

Hello:

This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:

On Thu, 20 Jul 2023 16:37:26 -0400 you wrote:
> 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>'?
> 
> [...]

Here is the summary with links:
  - [iproute2] bridge/mdb.c: include limits.h
    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=9d82667cc9d2

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2023-07-25  1:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-20 20:37 [PATCH iproute2] bridge/mdb.c: include limits.h Trevor Gamblin
2023-07-23  7:31 ` Ido Schimmel
2023-07-25  1:40 ` patchwork-bot+netdevbpf

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).