From 010eabe65eeeda35634480f8693454f5a6f43d67 Mon Sep 17 00:00:00 2001 From: br Date: Wed, 25 May 2016 14:08:21 +0000 Subject: Remove legacy brk and sbrk from RISC-V. Discussed with: andrew Sponsored by: DARPA, AFRL Sponsored by: HEIF5 --- contrib/netbsd-tests/lib/libc/gen/t_dir.c | 5 +++-- contrib/netbsd-tests/lib/libc/sys/t_mlock.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'contrib/netbsd-tests/lib/libc') diff --git a/contrib/netbsd-tests/lib/libc/gen/t_dir.c b/contrib/netbsd-tests/lib/libc/gen/t_dir.c index f888db9..a6ab9e8 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_dir.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_dir.c @@ -111,7 +111,8 @@ ATF_TC_BODY(seekdir_basic, tc) closedir(dp); } -#ifndef __aarch64__ /* There is no sbrk on AArch64 */ +/* There is no sbrk on AArch64 and RISC-V */ +#if !defined(__aarch64__) && !defined(__riscv__) ATF_TC(telldir_leak); ATF_TC_HEAD(telldir_leak, tc) { @@ -161,7 +162,7 @@ ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, seekdir_basic); -#ifndef __aarch64__ +#if !defined(__aarch64__) && !defined(__riscv__) ATF_TP_ADD_TC(tp, telldir_leak); #endif diff --git a/contrib/netbsd-tests/lib/libc/sys/t_mlock.c b/contrib/netbsd-tests/lib/libc/sys/t_mlock.c index 126f715..d4aef4a 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. -- cgit v1.1