Skip to content
Commit 05dec22d authored by John David Anglin's avatar John David Anglin
Browse files

resolv: Fix unaligned accesses to fields in HEADER struct



The structure HEADER is normally aligned to a word boundary but
sometimes it needs to be accessed when aligned on a byte boundary.
This change defines a new typedef, UHEADER, with alignment 1.
It is used to ensure the fields are accessed with byte loads and
stores when necessary.

V4: Change to res_mkquery.c deleted.  Small whitespace fix.

V5: Move UHEADER typedef to resolv/resolv-internal.h.  Replace all
HEADER usage with UHEADER in resolv/res_send.c.

Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
Reviewed-by: default avatarAdhemerval Zanella <adhemerval.zanella@linaro.org>
parent bc0d18d8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment