]> git.kaiwu.me - nginx.git/commitdiff
QUIC: fixed bulding perl module by reducing header pollution.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 22 Jul 2020 11:48:49 +0000 (14:48 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Wed, 22 Jul 2020 11:48:49 +0000 (14:48 +0300)
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
src/event/ngx_event_quic.c
src/event/ngx_event_quic_protection.c
src/event/ngx_event_quic_transport.c

index a8959ddcc2280cfbfd8d8a8246d290e4beeabf7e..ade35be7373af17f5d70da1befbecd116678171c 100644 (file)
@@ -86,8 +86,6 @@ typedef void (*ngx_connection_handler_pt)(ngx_connection_t *c);
 #include <ngx_event_openssl.h>
 #if (NGX_OPENSSL_QUIC)
 #include <ngx_event_quic.h>
-#include <ngx_event_quic_transport.h>
-#include <ngx_event_quic_protection.h>
 #endif
 #endif
 #include <ngx_process_cycle.h>
index 202c0082aa0eb3ac0f7a5095e33f24e509dfc478..9a8c94243d2ff4d907f8f8fcb814678fc274358b 100644 (file)
@@ -7,6 +7,8 @@
 #include <ngx_config.h>
 #include <ngx_core.h>
 #include <ngx_event.h>
+#include <ngx_event_quic_transport.h>
+#include <ngx_event_quic_protection.h>
 
 
 /*  0-RTT and 1-RTT data exist in the same packet number space,
index feba3eb3a483e425443decbc6fadc92caa331209..721944b9738d3f241299c3854e54c05493f23b7d 100644 (file)
@@ -7,6 +7,8 @@
 #include <ngx_config.h>
 #include <ngx_core.h>
 #include <ngx_event.h>
+#include <ngx_event_quic_transport.h>
+#include <ngx_event_quic_protection.h>
 
 
 #define NGX_QUIC_IV_LEN               12
index bba9ae9cbdbae2c6f865bb308e79eb92b3a10d37..f1fc094498549a1c5b18dbbce8390f59651cf64c 100644 (file)
@@ -7,6 +7,7 @@
 #include <ngx_config.h>
 #include <ngx_core.h>
 #include <ngx_event.h>
+#include <ngx_event_quic_transport.h>
 
 
 #if (NGX_HAVE_NONALIGNED)