1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/net/dns: mark dns_hdr_t as packed

This structure is used to parse data from unaligned buffers, so make
sure the compiler issues instructions suitable for unaligned memory
access.
This commit is contained in:
Marian Buschsieweke 2021-11-04 10:09:54 +01:00
parent 26346188b9
commit 2e6eca1918
No known key found for this signature in database
GPG Key ID: CB8E3238CE715A94

View File

@ -45,7 +45,7 @@ extern "C" {
*
* @see [RFC 1035, section 4.1.1](https://tools.ietf.org/html/rfc1035#section-4.1.1)
*/
typedef struct {
typedef struct __attribute__((packed)) {
uint16_t id; /**< identifier */
/**
* @brief flags