The alignment is needed when using CMSG_DATA() to access a uint64_t when an object of type struct cmsghdr is allocated on the stack. Also update the ALIGN_H and ALIGN_D macros to better match the description in RFC 3542: "The macros ALIGN_H() and ALIGN_D(), which are implementation dependent, round their arguments up to the next even multiple of whatever alignment is required for the start of the cmsghdr structure and the data, respectively." This commit makes the following test pass on qemu_leon3: - net.socket.udp. It previously generated an unaligned data access exception when a uint64_t value was accessed via CMSG_DATA(). Signed-off-by: Martin Åberg <martin.aberg@gaisler.com> |
||
|---|---|---|
| .. | ||
| bt.h | ||
| buf.h | ||
| can.h | ||
| coap_link_format.h | ||
| coap.h | ||
| dhcpv4.h | ||
| dns_resolve.h | ||
| dns_sd.h | ||
| dummy.h | ||
| ethernet_mgmt.h | ||
| ethernet_vlan.h | ||
| ethernet.h | ||
| gptp.h | ||
| hostname.h | ||
| http_client.h | ||
| http_parser_state.h | ||
| http_parser_url.h | ||
| http_parser.h | ||
| ieee802154_mgmt.h | ||
| ieee802154_radio.h | ||
| ieee802154.h | ||
| ipv4_autoconf.h | ||
| lldp.h | ||
| lwm2m_path.h | ||
| lwm2m.h | ||
| mii.h | ||
| mqtt.h | ||
| net_config.h | ||
| net_conn_mgr.h | ||
| net_context.h | ||
| net_core.h | ||
| net_event.h | ||
| net_if.h | ||
| net_ip.h | ||
| net_l2.h | ||
| net_linkaddr.h | ||
| net_mgmt.h | ||
| net_offload.h | ||
| net_pkt.h | ||
| net_stats.h | ||
| net_timeout.h | ||
| openthread.h | ||
| ppp.h | ||
| promiscuous.h | ||
| ptp_time.h | ||
| sntp.h | ||
| socket_can.h | ||
| socket_net_mgmt.h | ||
| socket_offload.h | ||
| socket_select.h | ||
| socket.h | ||
| socketutils.h | ||
| tftp.h | ||
| tls_credentials.h | ||
| trickle.h | ||
| udp.h | ||
| websocket.h | ||
| wifi_mgmt.h | ||
| wifi.h | ||