net: if: Add dummy member to anonymous union in net_if_addr
When both CONFIG_NET_IPV6_DAD and CONFIG_NET_IPV4_ACD are disabled, the
anonymous union in struct net_if_addr ends up with no members, which
results in a different struct layout between C and C++.
In C, an empty union has size 0, while in C++ it has size >=1, which
shifts the offsets of the following fields.
Add a 1-byte dummy member to the union to ensure consistent layout
across both compilers.
Signed-off-by:
Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
Loading
Please sign in to comment