0001-BUILD-atomic-atomic.h-may-need-compiler.h-on-ARMv8.2.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 5ab3c61932af7619518169da744ba6346f060405 Mon Sep 17 00:00:00 2001
  2. From: Willy Tarreau <w@1wt.eu>
  3. Date: Thu, 8 Dec 2022 08:32:57 +0100
  4. Subject: [PATCH] BUILD: atomic: atomic.h may need compiler.h on ARMv8.2-a
  5. We get a build error in ncbuf.c when building for ARMv8.2-a because ncbuf
  6. has minimal includes and among them bug.h which includes atomic.h. Atomic.h
  7. may use "forceinline" without including compiler.h, hence the build error.
  8. It was verified that adding it doesn't inflate the total headers.
  9. Since all other C files include api.h which already covers this, there's
  10. no real need to bapkport this. The issue was already there in 2.3 though.
  11. Upstream: https://git.haproxy.org/?p=haproxy.git;a=commitdiff;h=5ab3c61932af7619518169da744ba6346f060405#patch1
  12. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  13. ---
  14. include/haproxy/atomic.h | 2 ++
  15. 1 file changed, 2 insertions(+)
  16. diff --git a/include/haproxy/atomic.h b/include/haproxy/atomic.h
  17. index f60be95..7e3c826 100644
  18. --- a/include/haproxy/atomic.h
  19. +++ b/include/haproxy/atomic.h
  20. @@ -23,6 +23,8 @@
  21. #ifndef _HAPROXY_ATOMIC_H
  22. #define _HAPROXY_ATOMIC_H
  23. +#include <haproxy/compiler.h>
  24. +
  25. /* A few notes for the macros and functions here:
  26. * - this file is painful to edit, most operations exist in 3 variants,
  27. * no-thread, threads with gcc<4.7, threads with gcc>=4.7. Be careful when
  28. --
  29. 1.7.10.4