Signed-off-by: Jens Axboe <axboe@kernel.dk>
msg.magic = htonl(FIO_LINK_OPEN_CLOSE_MAGIC);
msg.cmd = htonl(FIO_LINK_CLOSE);
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");
sizeof(nd->addr));
if (ret < 0)
td_verror(td, errno, "sendto udp link close");
socklen_t len = sizeof(nd->addr);
int ret;
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;
if (ret < 0) {
td_verror(td, errno, "sendto udp link open");
return ret;
msg.magic = htonl(FIO_LINK_OPEN_CLOSE_MAGIC);
msg.cmd = htonl(FIO_LINK_OPEN);
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");
sizeof(nd->addr));
if (ret < 0) {
td_verror(td, errno, "sendto udp link open");
- 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;
}
td_verror(td, errno, "setsockopt");
return 1;
}
#include "../file.h"
#include "../log.h"
#include "../file.h"
#include "../log.h"
+#include "windows/posix.h"
+
#define FIO_HAVE_ODIRECT
#define FIO_HAVE_CPU_AFFINITY
#define FIO_HAVE_CHARDEV_SIZE
#define FIO_HAVE_ODIRECT
#define FIO_HAVE_CPU_AFFINITY
#define FIO_HAVE_CHARDEV_SIZE
#define fio_swap32(x) _byteswap_ulong(x)
#define fio_swap64(x) _byteswap_uint64(x)
#define fio_swap32(x) _byteswap_ulong(x)
#define fio_swap64(x) _byteswap_uint64(x)
-typedef off_t off64_t;
-typedef int clockid_t;
-
typedef DWORD_PTR os_cpu_mask_t;
#define CLOCK_REALTIME 1
typedef DWORD_PTR os_cpu_mask_t;
#define CLOCK_REALTIME 1
#endif
#ifndef FIO_OS_HAS_CTIME_R
#endif
#ifndef FIO_OS_HAS_CTIME_R
-#define os_ctime_r(x, y, z) ctime_r((x), (y))
+#define os_ctime_r(x, y, z) (void) ctime_r((x), (y))
#endif
#ifdef FIO_USE_GENERIC_SWAP
#endif
#ifdef FIO_USE_GENERIC_SWAP
--- /dev/null
+#ifndef FIO_WINDOWS_POSIX_H
+#define FIO_WINDOWS_POSIX_H
+
+typedef off_t off64_t;
+typedef int clockid_t;
+
+extern int clock_gettime(clockid_t clock_id, struct timespec *tp);
+extern int inet_aton(const char *, struct in_addr *);
+
+#endif
- if (setsockopt(sk, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) < 0) {
+ if (setsockopt(sk, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof(opt)) < 0) {
log_err("fio: setsockopt: %s\n", strerror(errno));
close(sk);
return -1;
log_err("fio: setsockopt: %s\n", strerror(errno));
close(sk);
return -1;