aboutsummaryrefslogtreecommitdiff
path: root/contrib/netbsd-tests/lib/libc/sys
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/netbsd-tests/lib/libc/sys')
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_mlock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_mlock.c b/contrib/netbsd-tests/lib/libc/sys/t_mlock.c
index 126f715d341c..d4aef4a382b1 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_mlock.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_mlock.c
@@ -176,7 +176,7 @@ ATF_TC_BODY(mlock_err, tc)
unsigned long vmin = 0;
size_t len = sizeof(vmin);
#endif
-#ifndef __aarch64__
+#if !defined(__aarch64__) && !defined(__riscv__)
void *invalid_ptr;
#endif
int null_errno = ENOMEM; /* error expected for NULL */
@@ -214,7 +214,8 @@ ATF_TC_BODY(mlock_err, tc)
errno = 0;
ATF_REQUIRE_ERRNO(EINVAL, munlock((char *)-1, page) == -1);
-#ifndef __aarch64__ /* There is no sbrk on AArch64 */
+/* There is no sbrk on AArch64 and RISC-V */
+#if !defined(__aarch64__) && !defined(__riscv__)
/*
* Try to create a pointer to an unmapped page - first after current
* brk will likely do.