Jens,
I've attached a patch to fix netio on Windows:
Add call to WSAStartup() to engines\net.c.
Fix NULL dereference in poll().
Add inet_aton().
--
Bruce Cran
Signed-off-by: Jens Axboe <axboe@kernel.dk>
td_verror(td, EINVAL, "bad direction");
return 1;
}
-
+
return 0;
}
struct netio_options *o = td->eo;
int ret;
+#ifdef WIN32
+ WSADATA wsd;
+ WSAStartup(MAKEWORD(2,2), &wsd);
+#endif
+
if (td_random(td)) {
log_err("fio: network IO can't be random\n");
return 1;
int i;
int rc;
- if (timeout != -1)
+ if (timeout != -1) {
to = &tv;
-
- to->tv_sec = timeout / 1000;
- to->tv_usec = (timeout % 1000) * 1000;
+ to->tv_sec = timeout / 1000;
+ to->tv_usec = (timeout % 1000) * 1000;
+ }
FD_ZERO(&readfds);
FD_ZERO(&writefds);
errno = ENOSPC;
WSACleanup();
+
return ret;
}
+int inet_aton(const char *cp, struct in_addr *inp)
+{
+ return inet_pton(AF_INET, cp, inp);
+}
+
int inet_pton(int af, const char *restrict src, void *restrict dst)
{
INT status = SOCKET_ERROR;