summaryrefslogtreecommitdiff
path: root/atomic
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2023-02-05 20:27:29 +0000
committerStefan Fritsch <sf@apache.org>2023-02-05 20:27:29 +0000
commitdfbbaf0fa87595a4e011fc4ddb5b6265f2fab9e4 (patch)
tree4409af10fafd0ec0fc51fc624f01df49a43deafe /atomic
parent49f9c5b8808f33de758445605a754d7283eecd1e (diff)
downloadapr-dfbbaf0fa87595a4e011fc4ddb5b6265f2fab9e4.tar.gz
Call apr__atomic_generic64_init() if needed
Otherwise we get a segfault. Seen on Debian on powerpc with /* Define if compiler provides 32bit atomic builtins */ #define HAVE_ATOMIC_BUILTINS 1 /* Define if compiler provides 64bit atomic builtins */ /* #undef HAVE_ATOMIC_BUILTINS64 */ /* Define if compiler provides 32bit __atomic builtins */ #define HAVE__ATOMIC_BUILTINS 1 /* Define if compiler provides 64bit __atomic builtins */ /* #undef HAVE__ATOMIC_BUILTINS64 */ /* Define if use of generic atomics is requested */ /* #undef USE_ATOMICS_GENERIC */ git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907442 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'atomic')
-rw-r--r--atomic/unix/builtins.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/atomic/unix/builtins.c b/atomic/unix/builtins.c
index e604a3d26..fbbb141e8 100644
--- a/atomic/unix/builtins.c
+++ b/atomic/unix/builtins.c
@@ -26,7 +26,11 @@
APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p)
{
+#if defined (NEED_ATOMICS_GENERIC64)
+ return apr__atomic_generic64_init(p);
+#else
return APR_SUCCESS;
+#endif
}
APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem)