Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/sys Make this compile on archs where VM_MIN_A...
details: https://anonhg.NetBSD.org/src/rev/7597bd4d8553
branches: trunk
changeset: 781474:7597bd4d8553
user: martin <martin%NetBSD.org@localhost>
date: Sat Sep 08 12:25:05 2012 +0000
description:
Make this compile on archs where VM_MIN_ADDRESS is not defined (or not
exported to userland)
diffstat:
tests/lib/libc/sys/t_mlock.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r a449070a1641 -r 7597bd4d8553 tests/lib/libc/sys/t_mlock.c
--- a/tests/lib/libc/sys/t_mlock.c Sat Sep 08 05:02:41 2012 +0000
+++ b/tests/lib/libc/sys/t_mlock.c Sat Sep 08 12:25:05 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mlock.c,v 1.3 2012/09/07 20:27:12 martin Exp $ */
+/* $NetBSD: t_mlock.c,v 1.4 2012/09/08 12:25:05 martin Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_mlock.c,v 1.3 2012/09/07 20:27:12 martin Exp $");
+__RCSID("$NetBSD: t_mlock.c,v 1.4 2012/09/08 12:25:05 martin Exp $");
#include <sys/mman.h>
#include <sys/resource.h>
@@ -83,8 +83,10 @@
void *invalid_ptr;
int null_errno = ENOMEM; /* error expected for NULL */
+#ifdef VM_MIN_ADDRESS
if ((uintptr_t)VM_MIN_ADDRESS > 0)
null_errno = EINVAL; /* NULL is not inside user VM */
+#endif
errno = 0;
ATF_REQUIRE_ERRNO(null_errno, mlock(NULL, page) == -1);
Home |
Main Index |
Thread Index |
Old Index