1From e1bcac837f6aeabc4ddece06ecbcf2bcca8dd651 Mon Sep 17 00:00:00 2001 2From: Edgar Bonet <bonet@grenoble.cnrs.fr> 3Date: Thu, 16 May 2024 11:15:10 +0200 4Subject: [PATCH] Configure: fixed building libatomic test. 5 6Using "long *" instead of "AO_t *" leads either to -Wincompatible-pointer-types 7or -Wpointer-sign warnings, depending on whether long and size_t are compatible 8types (e.g., ILP32 versus LP64 data models). Notably, -Wpointer-sign warnings 9are enabled by default in Clang only, and -Wincompatible-pointer-types is an 10error starting from GCC 14. 11 12Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr> 13Upstream: https://hg.nginx.org/nginx/rev/f58b6f636238 14--- 15 auto/lib/libatomic/conf | 2 +- 16 1 file changed, 1 insertion(+), 1 deletion(-) 17 18diff --git a/auto/lib/libatomic/conf b/auto/lib/libatomic/conf 19index d1e484a..0f12b9c 100644 20--- a/auto/lib/libatomic/conf 21+++ b/auto/lib/libatomic/conf 22@@ -20,7 +20,7 @@ else 23 #include <atomic_ops.h>" 24 ngx_feature_path= 25 ngx_feature_libs="-latomic_ops" 26- ngx_feature_test="long n = 0; 27+ ngx_feature_test="AO_t n = 0; 28 if (!AO_compare_and_swap(&n, 0, 1)) 29 return 1; 30 if (AO_fetch_and_add(&n, 1) != 1) 31-- 322.34.1 33 34