diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-10-01 23:49:16 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-10-01 23:49:16 +0200 |
| commit | a90a54aead2a082f9bc4d44fd48d1042bcd2c3fb (patch) | |
| tree | 5abb99630e8bdd59594db3c33ce2c353f5372ed7 | |
| parent | 689d0650ab63425adaea26afe347015a204958ee (diff) | |
| download | busybox-w32-a90a54aead2a082f9bc4d44fd48d1042bcd2c3fb.tar.gz busybox-w32-a90a54aead2a082f9bc4d44fd48d1042bcd2c3fb.tar.bz2 busybox-w32-a90a54aead2a082f9bc4d44fd48d1042bcd2c3fb.zip | |
udhcp: remove struct packing attribute, eliminates gcc-9.x
"error: taking address of packed member of 'struct ip_udp_dhcp_packet'
may result in an unaligned pointer value" here:
udhcp_dump_packet(&packet.data);
and in other places.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| -rw-r--r-- | networking/udhcp/common.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index 81c1dcbdc..3cbd2d3c8 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h | |||
| @@ -46,7 +46,7 @@ struct dhcp_packet { | |||
| 46 | uint8_t file[128]; /* boot file name (ASCIZ) */ | 46 | uint8_t file[128]; /* boot file name (ASCIZ) */ |
| 47 | uint32_t cookie; /* fixed first four option bytes (99,130,83,99 dec) */ | 47 | uint32_t cookie; /* fixed first four option bytes (99,130,83,99 dec) */ |
| 48 | uint8_t options[DHCP_OPTIONS_BUFSIZE + CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS]; | 48 | uint8_t options[DHCP_OPTIONS_BUFSIZE + CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS]; |
| 49 | } PACKED; | 49 | }; |
| 50 | #define DHCP_PKT_SNAME_LEN 64 | 50 | #define DHCP_PKT_SNAME_LEN 64 |
| 51 | #define DHCP_PKT_FILE_LEN 128 | 51 | #define DHCP_PKT_FILE_LEN 128 |
| 52 | #define DHCP_PKT_SNAME_LEN_STR "64" | 52 | #define DHCP_PKT_SNAME_LEN_STR "64" |
| @@ -56,12 +56,12 @@ struct ip_udp_dhcp_packet { | |||
| 56 | struct iphdr ip; | 56 | struct iphdr ip; |
| 57 | struct udphdr udp; | 57 | struct udphdr udp; |
| 58 | struct dhcp_packet data; | 58 | struct dhcp_packet data; |
| 59 | } PACKED; | 59 | }; |
| 60 | 60 | ||
| 61 | struct udp_dhcp_packet { | 61 | struct udp_dhcp_packet { |
| 62 | struct udphdr udp; | 62 | struct udphdr udp; |
| 63 | struct dhcp_packet data; | 63 | struct dhcp_packet data; |
| 64 | } PACKED; | 64 | }; |
| 65 | 65 | ||
| 66 | enum { | 66 | enum { |
| 67 | IP_UDP_DHCP_SIZE = sizeof(struct ip_udp_dhcp_packet) - CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS, | 67 | IP_UDP_DHCP_SIZE = sizeof(struct ip_udp_dhcp_packet) - CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS, |
