summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2012-04-11 09:45:47 +0000
committerespie <espie@openbsd.org>2012-04-11 09:45:47 +0000
commit96e7c894d34a06cea803b7ced51597b476f646ae (patch)
tree134304677027d6f094761eef6690bab287a67553
parentfuss with details (diff)
downloadwireguard-openbsd-96e7c894d34a06cea803b7ced51597b476f646ae.tar.xz
wireguard-openbsd-96e7c894d34a06cea803b7ced51597b476f646ae.zip
if we ever activate that, this may need fixing
-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) {