From: guenther Date: Sat, 27 Aug 2016 04:35:18 +0000 (+0000) Subject: Pull in for NULL X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=38f718e5b60da5e425d01fc6376e87fe19c08fbf;p=openbsd Pull in for NULL ok deraadt@ --- 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 * @@ -18,9 +18,10 @@ #include #include #include +#include #include +#include #include -#include /* 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 @@ -7,6 +7,7 @@ #include #include #include +#include #define MEM_SIZE 1024*1024