diff options
author | sf <sf@13f79535-47bb-0310-9956-ffa450edef68> | 2023-02-05 20:27:29 +0000 |
---|---|---|
committer | sf <sf@13f79535-47bb-0310-9956-ffa450edef68> | 2023-02-05 20:27:29 +0000 |
commit | 96d871fa9797758a13f9d8a3398465643b59ddc3 (patch) | |
tree | 4409af10fafd0ec0fc51fc624f01df49a43deafe | |
parent | b39263cf5a48413ea9e0a649e68f189f2c90d53e (diff) | |
download | libapr-96d871fa9797758a13f9d8a3398465643b59ddc3.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
-rw-r--r-- | atomic/unix/builtins.c | 4 |
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) |