From db7ec3c3e66b29aa1aee328d77a9a32dd3f8e812 Mon Sep 17 00:00:00 2001 From: Li-Wen Hsu Date: Wed, 20 May 2020 13:51:27 +0000 Subject: [PATCH] Fix i386 build for r361275 kponsored by: The FreeBSD Foundation --- sys/dev/hyperv/hvsock/hv_sock.c | 11 ++++++----- sys/dev/hyperv/vmbus/vmbus_br.c | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/dev/hyperv/hvsock/hv_sock.c b/sys/dev/hyperv/hvsock/hv_sock.c index 11a14106d42..316f5821d9e 100644 --- a/sys/dev/hyperv/hvsock/hv_sock.c +++ b/sys/dev/hyperv/hvsock/hv_sock.c @@ -792,7 +792,7 @@ hvs_trans_sosend(struct socket *so, struct sockaddr *addr, struct uio *uio, int error = 0; HVSOCK_DBG(HVSOCK_DBG_VERBOSE, - "%s: HyperV Socket hvs_trans_sosend called, uio_resid = %lu\n", + "%s: HyperV Socket hvs_trans_sosend called, uio_resid = %zd\n", __func__, uio->uio_resid); if (so->so_type != SOCK_STREAM) @@ -1154,7 +1154,7 @@ hvsock_br_callback(void *datap, int cplen, void *cbarg) return (EINVAL); HVSOCK_DBG(HVSOCK_DBG_VERBOSE, - "%s: called, uio_rw = %s, uio_resid = %lu, cplen = %u, " + "%s: called, uio_rw = %s, uio_resid = %zd, cplen = %u, " "datap = %p\n", __func__, (uio->uio_rw == UIO_READ) ? "read from br":"write to br", uio->uio_resid, cplen, datap); @@ -1168,7 +1168,7 @@ hvsock_br_callback(void *datap, int cplen, void *cbarg) SOCKBUF_LOCK(sb); HVSOCK_DBG(HVSOCK_DBG_VERBOSE, - "%s: after uiomove, uio_resid = %lu, error = %d\n", + "%s: after uiomove, uio_resid = %zd, error = %d\n", __func__, uio->uio_resid, error); return (error); @@ -1372,8 +1372,9 @@ hvsock_canwrite_check(struct hvs_pcb *pcb) * We must always reserve a 0-length-payload packet for the FIN. */ HVSOCK_DBG(HVSOCK_DBG_VERBOSE, - "%s: writeable is %u, should be greater than %lu\n", - __func__, writeable, HVSOCK_PKT_LEN(1) + HVSOCK_PKT_LEN(0)); + "%s: writeable is %u, should be greater than %ju\n", + __func__, writeable, + (uintmax_t)(HVSOCK_PKT_LEN(1) + HVSOCK_PKT_LEN(0))); if (writeable < HVSOCK_PKT_LEN(1) + HVSOCK_PKT_LEN(0)) { /* diff --git a/sys/dev/hyperv/vmbus/vmbus_br.c b/sys/dev/hyperv/vmbus/vmbus_br.c index 8e84e5e309a..7311f87fd59 100644 --- a/sys/dev/hyperv/vmbus/vmbus_br.c +++ b/sys/dev/hyperv/vmbus/vmbus_br.c @@ -66,9 +66,10 @@ vmbus_br_sysctl_state(SYSCTL_HANDLER_ARGS) ravail = br->vbr_dsize - wavail; snprintf(state, sizeof(state), - "intrcnt:%lu rindex:%u windex:%u imask:%u psndsz:%u fvalue:%u " + "intrcnt:%ju rindex:%u windex:%u imask:%u psndsz:%u fvalue:%u " "ravail:%u wavail:%u", - intrcnt, rindex, windex, imask, psndsz, fvalue, ravail, wavail); + (uintmax_t)intrcnt, rindex, windex, imask, psndsz, fvalue, + ravail, wavail); return sysctl_handle_string(oidp, state, sizeof(state), req); }