X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Fnet.c;h=de7cdb541824bc35d8eb3cb97121f24bcce5bde3;hp=eb05bcccc5cb9e1d8db8236a1a1fc0f78d8db48f;hb=1f81991ed356dd7257aef2c715ba9a24d9af93a5;hpb=36744c7511b71defe1c60666ae175ec8a5ed22c8 diff --git a/engines/net.c b/engines/net.c index eb05bccc..de7cdb54 100644 --- a/engines/net.c +++ b/engines/net.c @@ -541,7 +541,7 @@ static void fio_netio_udp_close(struct thread_data *td, struct fio_file *f) msg.magic = htonl(FIO_LINK_OPEN_CLOSE_MAGIC); msg.cmd = htonl(FIO_LINK_CLOSE); - ret = sendto(f->fd, &msg, sizeof(msg), MSG_WAITALL, to, + ret = sendto(f->fd, (void *) &msg, sizeof(msg), MSG_WAITALL, to, sizeof(nd->addr)); if (ret < 0) td_verror(td, errno, "sendto udp link close"); @@ -569,7 +569,7 @@ static int fio_netio_udp_recv_open(struct thread_data *td, struct fio_file *f) socklen_t len = sizeof(nd->addr); int ret; - ret = recvfrom(f->fd, &msg, sizeof(msg), MSG_WAITALL, to, &len); + ret = recvfrom(f->fd, (void *) &msg, sizeof(msg), MSG_WAITALL, to, &len); if (ret < 0) { td_verror(td, errno, "sendto udp link open"); return ret; @@ -595,7 +595,7 @@ static int fio_netio_udp_send_open(struct thread_data *td, struct fio_file *f) msg.magic = htonl(FIO_LINK_OPEN_CLOSE_MAGIC); msg.cmd = htonl(FIO_LINK_OPEN); - ret = sendto(f->fd, &msg, sizeof(msg), MSG_WAITALL, to, + ret = sendto(f->fd, (void *) &msg, sizeof(msg), MSG_WAITALL, to, sizeof(nd->addr)); if (ret < 0) { td_verror(td, errno, "sendto udp link open"); @@ -743,7 +743,7 @@ static int fio_netio_setup_listen_inet(struct thread_data *td, short port) } opt = 1; - if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) < 0) { + if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void*)&opt, sizeof(opt)) < 0) { td_verror(td, errno, "setsockopt"); return 1; }