summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2016-08-27 04:35:18 +0000
committerguenther <guenther@openbsd.org>2016-08-27 04:35:18 +0000
commit38f718e5b60da5e425d01fc6376e87fe19c08fbf (patch)
tree0a6159332b4b76ff106fc7a17895954c1b99b250
parentPull in <sys/time.h> for struct timeval (diff)
downloadwireguard-openbsd-38f718e5b60da5e425d01fc6376e87fe19c08fbf.tar.xz
wireguard-openbsd-38f718e5b60da5e425d01fc6376e87fe19c08fbf.zip
Pull in <stdio.h> for NULL
ok deraadt@
-rw-r--r--regress/sys/uvm/misc/misc.c6
-rw-r--r--regress/sys/uvm/mmap0/mmap0.c5
-rw-r--r--regress/sys/uvm/mmap_fixed/mmap_fixed.c3
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