From: akpm@linux-foundation.org Subject: [patch 1/1] net/ipv6/route.c: work around gcc-4.4.4 anon union initializer issue Date: Fri, 12 Jan 2018 16:18:27 -0800 Message-ID: <5a595053.ZGoOkSYptXloCWEN%akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: davem@davemloft.net, netdev@vger.kernel.org, akpm@linux-foundation.org, dsahern@gmail.com, idosch@mellanox.com Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:38744 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965312AbeAMAS3 (ORCPT ); Fri, 12 Jan 2018 19:18:29 -0500 Sender: netdev-owner@vger.kernel.org List-ID: From: Andrew Morton Subject: net/ipv6/route.c: work around gcc-4.4.4 anon union initializer issue gcc-4.4.4 has problems with initializers of anonymous union fields. 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.') 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.') Fixes: 2127d95aef6c ("ipv6: Clear nexthop flags upon netdev up") Cc: Ido Schimmel Cc: David Ahern Cc: David S. Miller Signed-off-by: Andrew Morton --- net/ipv6/route.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN net/ipv6/route.c~net-ipv6-routec-work-around-gcc-444-anon-union-initializer-issue net/ipv6/route.c --- a/net/ipv6/route.c~net-ipv6-routec-work-around-gcc-444-anon-union-initializer-issue +++ a/net/ipv6/route.c @@ -3583,7 +3583,7 @@ void rt6_sync_up(struct net_device *dev, { 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 +3692,7 @@ void rt6_sync_down_dev(struct net_device { struct arg_netdev_event arg = { .dev = dev, - .event = event, + { .event = event, }, }; fib6_clean_all(dev_net(dev), fib6_ifdown, &arg); _