From 0cef322a943e6691277fe39472ef8bf488164717 Mon Sep 17 00:00:00 2001 From: Sitsofe Wheeler Date: Wed, 19 Aug 2020 21:57:05 +0100 Subject: [PATCH] net: coerce the result of htonl before printing Technically htonl() returns a long on Windows (https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-htonl ) which upsets clang. Signed-off-by: Sitsofe Wheeler --- engines/net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engines/net.c b/engines/net.c index 91f25774..c6cec584 100644 --- a/engines/net.c +++ b/engines/net.c @@ -938,8 +938,9 @@ static int fio_netio_udp_recv_open(struct thread_data *td, struct fio_file *f) if (ntohl(msg.magic) != FIO_LINK_OPEN_CLOSE_MAGIC || ntohl(msg.cmd) != FIO_LINK_OPEN) { - log_err("fio: bad udp open magic %x/%x\n", ntohl(msg.magic), - ntohl(msg.cmd)); + log_err("fio: bad udp open magic %x/%x\n", + (unsigned int) ntohl(msg.magic), + (unsigned int) ntohl(msg.cmd)); return -1; } -- 2.25.1