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
@@ -38,7 +38,7 @@ struct switchdev_attr {
|
||||
struct netdev_phys_item_id ppid; /* PORT_PARENT_ID */
|
||||
u8 stp_state; /* PORT_STP_STATE */
|
||||
unsigned long brport_flags; /* PORT_BRIDGE_FLAGS */
|
||||
};
|
||||
} u;
|
||||
};
|
||||
|
||||
struct fib_info;
|
||||
@@ -67,7 +67,7 @@ struct switchdev_obj {
|
||||
u32 nlflags;
|
||||
u32 tb_id;
|
||||
} ipv4_fib;
|
||||
};
|
||||
} u;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user