Index: lib/libc/locale/xlocale_private.h =================================================================== --- lib/libc/locale/xlocale_private.h +++ lib/libc/locale/xlocale_private.h @@ -144,7 +144,7 @@ xlocale_retain(void *val) { struct xlocale_refcounted *obj = val; - atomic_add_long(&(obj->retain_count), 1); + atomic_add_long((volatile u_long *)&(obj->retain_count), 1); return (val); } /** @@ -157,7 +157,7 @@ struct xlocale_refcounted *obj = val; long count; - count = atomic_fetchadd_long(&(obj->retain_count), -1) - 1; + count = atomic_fetchadd_long((volatile u_long *)&(obj->retain_count), -1) - 1; if (count < 0 && obj->destructor != NULL) obj->destructor(obj); }