From ca0b9871bc74d7d4548d76eb4d4c2a3a5ebb22ec Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Wed, 22 Jul 2020 14:48:49 +0300 Subject: [PATCH] QUIC: fixed bulding perl module by reducing header pollution. The ngx_http_perl_module module doesn't have a notion of including additional search paths through --with-cc-opt, which results in compile error incomplete type 'enum ssl_encryption_level_t' when building nginx without QUIC support. The enum is visible from quic event headers and eventually pollutes ngx_core.h. The fix is to limit including headers to compile units that are real consumers. --- src/core/ngx_core.h | 2 -- src/event/ngx_event_quic.c | 2 ++ src/event/ngx_event_quic_protection.c | 2 ++ src/event/ngx_event_quic_transport.c | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/ngx_core.h b/src/core/ngx_core.h index a8959ddcc..ade35be73 100644 --- a/src/core/ngx_core.h +++ b/src/core/ngx_core.h @@ -86,8 +86,6 @@ typedef void (*ngx_connection_handler_pt)(ngx_connection_t *c); #include #if (NGX_OPENSSL_QUIC) #include -#include -#include #endif #endif #include diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c index 202c0082a..9a8c94243 100644 --- a/src/event/ngx_event_quic.c +++ b/src/event/ngx_event_quic.c @@ -7,6 +7,8 @@ #include #include #include +#include +#include /* 0-RTT and 1-RTT data exist in the same packet number space, diff --git a/src/event/ngx_event_quic_protection.c b/src/event/ngx_event_quic_protection.c index feba3eb3a..721944b97 100644 --- a/src/event/ngx_event_quic_protection.c +++ b/src/event/ngx_event_quic_protection.c @@ -7,6 +7,8 @@ #include #include #include +#include +#include #define NGX_QUIC_IV_LEN 12 diff --git a/src/event/ngx_event_quic_transport.c b/src/event/ngx_event_quic_transport.c index bba9ae9cb..f1fc09449 100644 --- a/src/event/ngx_event_quic_transport.c +++ b/src/event/ngx_event_quic_transport.c @@ -7,6 +7,7 @@ #include #include #include +#include #if (NGX_HAVE_NONALIGNED)