Skip to content

Commit ae584be

Browse files
committed
[nrf fromlist] net: if: Add dummy member to anonymous union in net_if_addr
Without a member, the anonymous union ends up with different size in C and C++, causing the following fields to have different offsets. Adding a 1-byte dummy member ensures consistent layout across both compilers. Upstream PR #: 90359 Signed-off-by: Adrian Gielniewski <[email protected]>
1 parent 711cb9e commit ae584be

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/zephyr/net/net_if.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ struct net_if_addr {
125125
uint8_t acd_state;
126126
};
127127
#endif /* CONFIG_NET_IPV4_ACD */
128+
uint8_t _dummy;
128129
};
129130

130131
#if defined(CONFIG_NET_IPV6_DAD) || defined(CONFIG_NET_IPV4_ACD)

0 commit comments

Comments
 (0)