BUILD: quic: Missing quic_ssl.h header protection
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 4 Jan 2024 12:56:44 +0000 (13:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 5 Jan 2024 18:07:51 +0000 (19:07 +0100)
commit8ff3edf49f82d1a8197d0398e06e6cb79dbdccca
tree2f34c2ee0598a9e1ec52687ee89d712a120ccc81
parentd73c2d1c29bf86875cb2d99b6327e17a9b5eff3e
BUILD: quic: Missing quic_ssl.h header protection

Such "#ifdef USE_QUIC" prepocessor statements are used by QUIC C header
to avoid inclusion of QUIC headers when the QUIC support is not enabled
(by USE_QUIC make variable). Furthermore, this allows inclusions of QUIC
header from C file without having to protect them with others "#ifdef USE_QUIC"
statements as follows:

   #ifdef USE_QUIC
   #include <a QUIC header>
   #include <another one QUIC header>
   #endif /* USE_QUIC */

So, here if this quic_ssl.h header was included by a C file, and compiled without
QUIC support, this will lead to build errrors as follows:

 In file included from <a C file...>:
        include/haproxy/quic_ssl.h:35:35: warning: â\80\98enum ssl_encryption_level_tâ\80\99
        declared inside parameter list will not be visible outside of this
        definition or declaration

Should be backported to 2.9 to avoid such building issues to come.

(cherry picked from commit fd178ccdb0e0c22ce784d53762bef33b5709bdaa)
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/haproxy/quic_ssl.h