* [PATCH net-next] ipv6: Fix build with gcc-4.4.5
@ 2018-01-12 20:07 Ido Schimmel
2018-01-15 19:28 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ido Schimmel @ 2018-01-12 20:07 UTC (permalink / raw)
To: netdev; +Cc: davem, dsahern, emils.tantilov, mlxsw, Ido Schimmel
Emil reported the following compiler errors:
net/ipv6/route.c: In function `rt6_sync_up`:
net/ipv6/route.c:3586: error: unknown field `nh_flags` specified in initializer
net/ipv6/route.c:3586: warning: missing braces around initializer
net/ipv6/route.c:3586: warning: (near initialization for `arg.<anonymous>`)
net/ipv6/route.c: In function `rt6_sync_down_dev`:
net/ipv6/route.c:3695: error: unknown field `event` specified in initializer
net/ipv6/route.c:3695: warning: missing braces around initializer
net/ipv6/route.c:3695: warning: (near initialization for `arg.<anonymous>`)
Problem is with the named initializers for the anonymous union members.
Fix this by adding curly braces around the initialization.
Fixes: 4c981e28d373 ("ipv6: Prepare to handle multiple netdev events")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Emil S Tantilov <emils.tantilov@gmail.com>
Tested-by: Emil S Tantilov <emils.tantilov@gmail.com>
---
net/ipv6/route.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 1076ae0ea9d5..c37bd9569172 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -3583,7 +3583,9 @@ void rt6_sync_up(struct net_device *dev, unsigned int nh_flags)
{
struct arg_netdev_event arg = {
.dev = dev,
- .nh_flags = nh_flags,
+ {
+ .nh_flags = nh_flags,
+ },
};
if (nh_flags & RTNH_F_DEAD && netif_carrier_ok(dev))
@@ -3692,7 +3694,9 @@ void rt6_sync_down_dev(struct net_device *dev, unsigned long event)
{
struct arg_netdev_event arg = {
.dev = dev,
- .event = event,
+ {
+ .event = event,
+ },
};
fib6_clean_all(dev_net(dev), fib6_ifdown, &arg);
--
2.14.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] ipv6: Fix build with gcc-4.4.5
2018-01-12 20:07 [PATCH net-next] ipv6: Fix build with gcc-4.4.5 Ido Schimmel
@ 2018-01-15 19:28 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-01-15 19:28 UTC (permalink / raw)
To: idosch; +Cc: netdev, dsahern, emils.tantilov, mlxsw
From: Ido Schimmel <idosch@mellanox.com>
Date: Fri, 12 Jan 2018 22:07:36 +0200
> Emil reported the following compiler errors:
>
> net/ipv6/route.c: In function `rt6_sync_up`:
> net/ipv6/route.c:3586: error: unknown field `nh_flags` specified in initializer
> net/ipv6/route.c:3586: warning: missing braces around initializer
> net/ipv6/route.c:3586: warning: (near initialization for `arg.<anonymous>`)
> net/ipv6/route.c: In function `rt6_sync_down_dev`:
> net/ipv6/route.c:3695: error: unknown field `event` specified in initializer
> net/ipv6/route.c:3695: warning: missing braces around initializer
> net/ipv6/route.c:3695: warning: (near initialization for `arg.<anonymous>`)
>
> Problem is with the named initializers for the anonymous union members.
> Fix this by adding curly braces around the initialization.
>
> Fixes: 4c981e28d373 ("ipv6: Prepare to handle multiple netdev events")
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> Reported-by: Emil S Tantilov <emils.tantilov@gmail.com>
> Tested-by: Emil S Tantilov <emils.tantilov@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-15 19:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-12 20:07 [PATCH net-next] ipv6: Fix build with gcc-4.4.5 Ido Schimmel
2018-01-15 19:28 ` David Miller
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).