diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2016-08-27 04:35:20 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2016-08-27 04:35:20 +0000 |
commit | 1687048d75dd9149d7c97589c0f727f41d7cd39d (patch) | |
tree | a83eb817ceafe05b17b011512b097ea3a403531c /regress | |
parent | 41ed3d27336a5fea9b176655c8ca64ce3c297d48 (diff) |
Pull in <stdio.h> for NULL
ok deraadt@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sys/uvm/misc/misc.c | 6 | ||||
-rw-r--r-- | regress/sys/uvm/mmap0/mmap0.c | 5 | ||||
-rw-r--r-- | regress/sys/uvm/mmap_fixed/mmap_fixed.c | 3 |
3 files changed, 11 insertions, 3 deletions
diff --git a/regress/sys/uvm/misc/misc.c b/regress/sys/uvm/misc/misc.c index d902b6b5176..47e4faea1b1 100644 --- a/regress/sys/uvm/misc/misc.c +++ b/regress/sys/uvm/misc/misc.c @@ -139,6 +139,12 @@ main(argc, argv) (void) munmap(addr, st.st_size); + if (munlock(addr, pgsize) == 0) + errx(1, "munlock %s (again): should have failed but didn't", + filename); + if (errno != ENOMEM) + err(1, "munlock %s (again)", filename); + /* * TEST MLOCKALL'ING AN ANONYMOUS MEMORY RANGE. */ diff --git a/regress/sys/uvm/mmap0/mmap0.c b/regress/sys/uvm/mmap0/mmap0.c index df4286e359f..d750fa5e295 100644 --- a/regress/sys/uvm/mmap0/mmap0.c +++ b/regress/sys/uvm/mmap0/mmap0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mmap0.c,v 1.1 2011/10/07 19:43:07 ariane Exp $ */ +/* $OpenBSD: mmap0.c,v 1.2 2016/08/27 04:35:19 guenther Exp $ */ /* * Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl> * @@ -18,9 +18,10 @@ #include <sys/types.h> #include <sys/mman.h> #include <err.h> +#include <errno.h> #include <fcntl.h> +#include <stdio.h> #include <sysexits.h> -#include <errno.h> /* diff --git a/regress/sys/uvm/mmap_fixed/mmap_fixed.c b/regress/sys/uvm/mmap_fixed/mmap_fixed.c index c53acb3e2aa..020fecb160e 100644 --- a/regress/sys/uvm/mmap_fixed/mmap_fixed.c +++ b/regress/sys/uvm/mmap_fixed/mmap_fixed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mmap_fixed.c,v 1.2 2016/08/25 05:12:06 deraadt Exp $ */ +/* $OpenBSD: mmap_fixed.c,v 1.3 2016/08/27 04:35:19 guenther Exp $ */ /* * Public domain. 2006, Kurt Miller <kurt@intricatesoftware.com> @@ -7,6 +7,7 @@ #include <sys/types.h> #include <sys/mman.h> #include <err.h> +#include <stdio.h> #define MEM_SIZE 1024*1024 |