diff --git a/ndhc/clientpacket.c b/ndhc/clientpacket.c index 4a1442b..9e4e6d4 100644 --- a/ndhc/clientpacket.c +++ b/ndhc/clientpacket.c @@ -183,7 +183,7 @@ int get_raw_packet(struct dhcpMessage *payload, int fd) memset(&packet, 0, packet_size); while (len < packet_size) { - ssize_t r = read(fd, &packet + len, packet_size - len); + ssize_t r = read(fd, ((char *)&packet) + len, packet_size - len); if (r == 0) break; if (r == -1) {