diff options
author | 1999-12-21 05:52:46 +0000 | |
---|---|---|
committer | 1999-12-21 05:52:46 +0000 | |
commit | 8f3ca432b9e07208b40117c057b32fe3ef24d3c1 (patch) | |
tree | 9a490423829c1b840baa1bc8c7183cadcccdb087 | |
parent | strip lynx before installation. (diff) | |
download | wireguard-openbsd-8f3ca432b9e07208b40117c057b32fe3ef24d3c1.tar.xz wireguard-openbsd-8f3ca432b9e07208b40117c057b32fe3ef24d3c1.zip |
Use MAP_PRIVATE for mmap() flags instead of 0. With UVM this defaults
to MAP_PRIVATE anyway but we want to avoid the kernel complaining...
-rw-r--r-- | usr.bin/look/look.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/look/look.c b/usr.bin/look/look.c index 7be948301df..0e2c5a98a19 100644 --- a/usr.bin/look/look.c +++ b/usr.bin/look/look.c @@ -1,4 +1,4 @@ -/* $OpenBSD: look.c,v 1.3 1997/01/15 23:42:48 millert Exp $ */ +/* $OpenBSD: look.c,v 1.4 1999/12/21 05:52:46 millert Exp $ */ /* $NetBSD: look.c,v 1.7 1995/08/31 22:41:02 jtc Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)look.c 8.2 (Berkeley) 5/4/95"; #endif -static char rcsid[] = "$OpenBSD: look.c,v 1.3 1997/01/15 23:42:48 millert Exp $"; +static char rcsid[] = "$OpenBSD: look.c,v 1.4 1999/12/21 05:52:46 millert Exp $"; #endif /* not lint */ /* @@ -148,7 +148,7 @@ main(argc, argv) if (sb.st_size > SIZE_T_MAX) err(2, "%s: %s", file, strerror(EFBIG)); if ((front = mmap(NULL, - (size_t)sb.st_size, PROT_READ, 0, fd, (off_t)0)) == NULL) + (size_t)sb.st_size, PROT_READ, MAP_PRIVATE, fd, (off_t)0)) == NULL) err(2, "%s", file); back = front + sb.st_size; exit(look(string, front, back)); |