From: Olivier Houchard Date: Wed, 14 Oct 2026 13:35:36 +0000 (+0200) Subject: BUILD: sym: Make sure __always_inline always is inline. X-Git-Tag: v3.5-dev10~188 X-Git-Url: https://git.kaiwu.me/$%7BISSUES%7D/static/gitweb.js?a=commitdiff_plain;h=ef7ca1014fc1c488c6fc839a809053bb7f77f7c6;p=haproxy.git BUILD: sym: Make sure __always_inline always is inline. __always_inline is provided by most OS, but on Linux and FreeBSD, it does come with the "inline" keyword, while it does not at least on NetBSD. Solve the issue by undefining it, and always providing "inline", as it is what the xz code expects, otherwise gcc will be unhappy. --- diff --git a/include/import/xz_config.h b/include/import/xz_config.h index d7d4031da..ce9e4ff42 100644 --- a/include/import/xz_config.h +++ b/include/import/xz_config.h @@ -70,17 +70,17 @@ * __always_inline to plain inline, but don't complain if the code * becomes slow. * - * NOTE: System headers on GNU/Linux may #define this macro already, - * so if you want to change it, you need to #undef it first. + * NOTE: System headers may #define this macro already, but at least + * NetBSD's definition lacks the inline keyword, while Linux + * FreeBSD provide it. So make sure it is always there. */ -#ifndef __always_inline -# ifdef __GNUC__ -# define __always_inline \ - inline __attribute__((__always_inline__)) -# else -# define __always_inline inline -# endif -#endif +#undef __always_inline +# ifdef __GNUC__ +# define __always_inline \ + inline __attribute__((__always_inline__)) +# else +# define __always_inline inline +# endif /* Inline functions to access unaligned unsigned 32-bit integers */ #ifndef get_unaligned_le32