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;
}
td_verror(td, EINVAL, "bad direction");
return 1;
}
struct netio_options *o = td->eo;
int ret;
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;
if (td_random(td)) {
log_err("fio: network IO can't be random\n");
return 1;
-
- 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);
FD_ZERO(&readfds);
FD_ZERO(&writefds);
errno = ENOSPC;
WSACleanup();
errno = ENOSPC;
WSACleanup();
+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;
int inet_pton(int af, const char *restrict src, void *restrict dst)
{
INT status = SOCKET_ERROR;