From cdfb5ab81f82cdcb0f58d139385d626df29f4069 Mon Sep 17 00:00:00 2001 From: Arun Thomas Date: Sat, 11 Aug 2012 17:44:21 +0200 Subject: [PATCH] common/libc: build for ARM --- common/lib/libc/arch/arm/atomic/Makefile.inc | 2 +- common/lib/libc/atomic/atomic_init_testset.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common/lib/libc/arch/arm/atomic/Makefile.inc b/common/lib/libc/arch/arm/atomic/Makefile.inc index 9f0233780..2d1c864e9 100644 --- a/common/lib/libc/arch/arm/atomic/Makefile.inc +++ b/common/lib/libc/arch/arm/atomic/Makefile.inc @@ -1,7 +1,7 @@ # $NetBSD: Makefile.inc,v 1.8 2009/01/04 17:54:29 pooka Exp $ .if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread" \ - || ${LIB} == "rump") + || ${LIB} == "rump" || (defined(__MINIX) && ${LIB} == "sys")) SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \ atomic_and_32_nv_cas.c atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \ diff --git a/common/lib/libc/atomic/atomic_init_testset.c b/common/lib/libc/atomic/atomic_init_testset.c index 9769d62b5..74baecf12 100644 --- a/common/lib/libc/atomic/atomic_init_testset.c +++ b/common/lib/libc/atomic/atomic_init_testset.c @@ -112,11 +112,14 @@ _atomic_cas_32(volatile uint32_t *ptr, uint32_t old, uint32_t new) void __libc_atomic_init(void) { +#if !defined(__minix) int ncpu, mib[2]; size_t len; +#endif _atomic_cas_fn = _atomic_cas_mp; +#if !defined(__minix) mib[0] = CTL_HW; mib[1] = HW_NCPU; len = sizeof(ncpu); @@ -129,6 +132,7 @@ __libc_atomic_init(void) _atomic_cas_fn = _atomic_cas_up; return; } +#endif } #undef atomic_cas_32 -- 2.44.0