2
1

0011-Fix-compile-error-in-configure-script.patch 1.2 KB

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