switchdev: don't use anonymous union on switchdev attr/obj structs
Older gcc versions (e.g. gcc version 4.4.6) don't like anonymous unions which was causing build issues on the newly added switchdev attr/obj structs. Fix this by using named union on structs. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Reported-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
1f7bd29bc0
commit
42275bd8fc
@@ -465,8 +465,8 @@ static ssize_t phys_switch_id_show(struct device *dev,
|
||||
|
||||
ret = switchdev_port_attr_get(netdev, &attr);
|
||||
if (!ret)
|
||||
ret = sprintf(buf, "%*phN\n", attr.ppid.id_len,
|
||||
attr.ppid.id);
|
||||
ret = sprintf(buf, "%*phN\n", attr.u.ppid.id_len,
|
||||
attr.u.ppid.id);
|
||||
}
|
||||
rtnl_unlock();
|
||||
|
||||
|
Reference in New Issue
Block a user