Index: head/sys/kern/uipc_mbuf.c =================================================================== --- head/sys/kern/uipc_mbuf.c +++ head/sys/kern/uipc_mbuf.c @@ -1517,7 +1517,7 @@ * the total data supplied by the uio. */ if (len > 0) - total = min(uio->uio_resid, len); + total = (uio->uio_resid < len) ? uio->uio_resid : len; else total = uio->uio_resid;