--- bin/cp/utils.c 2020-09-26 18:15:40.072631000 -0700 +++ bin/cp/utils.c 2020-09-27 17:39:57.404325000 -0700 @@ -77,7 +77,7 @@ __FBSDID("$FreeBSD: head/bin/cp/utils.c 365643 2020-09 static int copy_fallback(int from_fd, int to_fd, char *buf, size_t bufsize) { - int rcount; + ssize_t rcount; ssize_t wresid, wcount = 0; char *bufp; @@ -236,7 +236,7 @@ copy_file(const FTSENT *entp, int dne) do { if (use_copy_file_range) { rcount = copy_file_range(from_fd, NULL, - to_fd, NULL, bufsize, 0); + to_fd, NULL, SSIZE_MAX, 0); if (rcount < 0 && errno == EINVAL) { /* Prob a non-seekable FD */ use_copy_file_range = 0;