diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-12-08 22:44:19 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-12-08 22:44:19 +0000 |
commit | a09f701c8fd9ece69c061848066e2891be7001c1 (patch) | |
tree | fde78b1efff3cc6ef9b4191785ea5c5b48dcd7c9 /usr.bin | |
parent | 05f5bc3d541eecbb38b53211ceb4121a1bfbeef3 (diff) |
MAP_FILE is the default and MAP_PRIVATE has to be given or produces evil warnings in debug kernel
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/patch/inp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/patch/inp.c b/usr.bin/patch/inp.c index 156848dea91..3326843ad00 100644 --- a/usr.bin/patch/inp.c +++ b/usr.bin/patch/inp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inp.c,v 1.30 2003/11/21 21:25:59 mickey Exp $ */ +/* $OpenBSD: inp.c,v 1.31 2003/12/08 22:44:18 mickey Exp $ */ /* * patch - a program to apply diffs to original files @@ -27,7 +27,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: inp.c,v 1.30 2003/11/21 21:25:59 mickey Exp $"; +static const char rcsid[] = "$OpenBSD: inp.c,v 1.31 2003/12/08 22:44:18 mickey Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -248,7 +248,7 @@ plan_a(const char *filename) if ((ifd = open(filename, O_RDONLY)) < 0) pfatal("can't open file %s", filename); - i_womp = mmap(NULL, i_size, PROT_READ, MAP_FILE, ifd, 0); + i_womp = mmap(NULL, i_size, PROT_READ, MAP_PRIVATE, ifd, 0); if (i_womp == MAP_FAILED) { perror("mmap failed"); i_womp = NULL; |