sprintf((char *)state->spacket.u.request.data, "%s%c%s%c",
filename, '\0', mode, '\0');
sbytes = 4 + strlen(filename) + strlen(mode);
- sbytes = sendto(state->sockfd, &state->spacket, sbytes, 0,
+ sbytes = sendto(state->sockfd, (void *)&state->spacket,
+ sbytes, 0,
state->conn->ip_addr->ai_addr,
state->conn->ip_addr->ai_addrlen);
if(sbytes < 0) {
state->retries = 0;
state->spacket.event = htons(TFTP_EVENT_ACK);
state->spacket.u.ack.block = htons(state->block);
- sbytes = sendto(state->sockfd, &state->spacket, 4, MSG_NOSIGNAL,
+ sbytes = sendto(state->sockfd, (void *)&state->spacket,
+ 4, MSG_NOSIGNAL,
(struct sockaddr *)&state->remote_addr,
state->remote_addrlen);
if(sbytes < 0) {
state->state = TFTP_STATE_FIN;
} else {
/* Resend the previous ACK */
- sbytes = sendto(state->sockfd, &state->spacket,
+ sbytes = sendto(state->sockfd, (void *)&state->spacket,
4, MSG_NOSIGNAL,
(struct sockaddr *)&state->remote_addr,
state->remote_addrlen);
return;
}
Curl_fillreadbuffer(state->conn, 512, &state->sbytes);
- sbytes = sendto(state->sockfd, &state->spacket,
+ sbytes = sendto(state->sockfd, (void *)&state->spacket,
4+state->sbytes, MSG_NOSIGNAL,
(struct sockaddr *)&state->remote_addr,
state->remote_addrlen);
state->state = TFTP_STATE_FIN;
} else {
/* Re-send the data packet */
- sbytes = sendto(state->sockfd, &state->spacket,
+ sbytes = sendto(state->sockfd, (void *)&state->spacket,
4+state->sbytes, MSG_NOSIGNAL,
(struct sockaddr *)&state->remote_addr,
state->remote_addrlen);