Skip to content

Commit

Permalink
arp.h: make struct arpreq four-byte aligned
Browse files Browse the repository at this point in the history
avoid memory waste in 64-bit architectures.

Signed-off-by: zhanghongyu <[email protected]>
  • Loading branch information
zhhyu7 authored and anchao committed Oct 30, 2024
1 parent 8461f0e commit c11752e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/netinet/arp.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

/* All ARP ioctls take a pointer to a struct arpreq as their parameter: */

struct aligned_data(sizeof(FAR void *)) arpreq
struct aligned_data(sizeof(uint32_t)) arpreq
{
struct sockaddr arp_pa; /* Protocol address */
struct sockaddr arp_ha; /* Hardware address */
Expand Down

0 comments on commit c11752e

Please sign in to comment.