diff options
Diffstat (limited to 'usr.bin/rsync/copy.c')
-rw-r--r-- | usr.bin/rsync/copy.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/rsync/copy.c b/usr.bin/rsync/copy.c index f133508cda0..f6a43d28434 100644 --- a/usr.bin/rsync/copy.c +++ b/usr.bin/rsync/copy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: copy.c,v 1.2 2021/10/24 21:24:17 deraadt Exp $ */ +/* $OpenBSD: copy.c,v 1.3 2021/11/28 19:28:42 deraadt Exp $ */ /* * Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org> * @@ -15,7 +15,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <sys/param.h> /* MAXBSIZE */ +#include <sys/types.h> #include <err.h> #include <fcntl.h> @@ -23,6 +23,8 @@ #include "extern.h" +#define _MAXBSIZE (64 * 1024) + /* * Return true if all bytes in buffer are zero. * A buffer of zero lenght is also considered a zero buffer. @@ -42,7 +44,7 @@ iszero(const void *b, size_t len) static int copy_internal(int fromfd, int tofd) { - char buf[MAXBSIZE]; + char buf[_MAXBSIZE]; ssize_t r, w; while ((r = read(fromfd, buf, sizeof(buf))) > 0) { |