summaryrefslogtreecommitdiff
path: root/bin/cp
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2012-04-11 09:45:48 +0000
committerMarc Espie <espie@cvs.openbsd.org>2012-04-11 09:45:48 +0000
commit130571f42c2079cfa7ac5bd6a8e09876c9b1da18 (patch)
treecbd23f8cb1a2cb8fb5bf0f58cd3c5d6614c9b459 /bin/cp
parentc258dd82ebcc2a624d0fa2e56061288ca67d4890 (diff)
if we ever activate that, this may need fixing
Diffstat (limited to 'bin/cp')
-rw-r--r--bin/cp/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index d17f1b2b8ad..c45a6a4af32 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.c,v 1.31 2011/06/23 11:43:13 otto Exp $ */
+/* $OpenBSD: utils.c,v 1.32 2012/04/11 09:45:47 espie Exp $ */
/* $NetBSD: utils.c,v 1.6 1997/02/26 14:40:51 cgd Exp $ */
/*-
@@ -121,6 +121,7 @@ copy_file(FTSENT *entp, int dne)
* wins some CPU back.
*/
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
+ /* XXX broken for 0-size mmap */
if (fs->st_size <= 8 * 1048576) {
if ((p = mmap(NULL, (size_t)fs->st_size, PROT_READ,
MAP_FILE|MAP_SHARED, from_fd, (off_t)0)) == MAP_FAILED) {