From ca6f63a1edabe8f58e2dd508c7606a61450b2fac Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Tue, 8 Apr 2008 16:34:50 +0000 Subject: [PATCH] Quick fix for the kernel build breakage in netgraph and the aliasing warning in libthr. A more elaborate fix is in the works that makes sure that all variants have proper inline functions with proper types. --- sys/powerpc/include/atomic.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h index 0d1e3c1bc8a..05bdb950ee0 100644 --- a/sys/powerpc/include/atomic.h +++ b/sys/powerpc/include/atomic.h @@ -226,8 +226,10 @@ atomic_readandclear_64(volatile u_int64_t *addr) #define atomic_set_long atomic_set_32 #define atomic_clear_long atomic_clear_32 -#define atomic_add_long(p, v) atomic_add_32((uint32_t *)p, (uint32_t)v) -#define atomic_subtract_long(p, v) atomic_subtract_32((uint32_t *)p, (uint32_t)v) +#define atomic_add_long(p, v) \ + atomic_add_32((volatile uint32_t *)(volatile void *)p, v) +#define atomic_subtract_long(p, v) \ + atomic_subtract_32((volatile uint32_t *)(volatile void *)p, v) #define atomic_readandclear_long atomic_readandclear_32 #define atomic_set_ptr atomic_set_32