From 0a0041d1955a7715024a78db93b56c1a58517789 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 14 Feb 2024 08:41:11 +0100 Subject: [PATCH] BUILD: tree-wide: fix a few missing includes in a few files Some include files, mostly types definitions, are missing a few includes to define the types they're using, causing include ordering dependencies between files, which are most often not seen due to the alphabetical order of includes. Let's just fix them. These were spotted by building pre-compiled headers for all these files to .h.gch. --- include/haproxy/bug.h | 1 + include/haproxy/cbuf-t.h | 1 + include/haproxy/defaults.h | 2 ++ include/haproxy/dgram-t.h | 2 ++ include/haproxy/dynbuf-t.h | 1 + include/haproxy/filters-t.h | 1 + include/haproxy/http_client.h | 1 + include/haproxy/jwt-t.h | 1 + include/haproxy/mqtt-t.h | 1 + include/haproxy/proto_quic.h | 4 ++++ include/haproxy/proto_sockpair.h | 2 ++ include/haproxy/proto_udp.h | 2 ++ include/haproxy/qpack-dec.h | 2 ++ include/haproxy/qpack-tbl-t.h | 2 ++ include/haproxy/queue-t.h | 1 + include/haproxy/quic_ack-t.h | 4 ++++ include/haproxy/quic_ack.h | 6 ++++++ include/haproxy/quic_rx-t.h | 7 +++++++ include/haproxy/quic_tls-t.h | 1 + include/haproxy/quic_tx-t.h | 3 +++ include/haproxy/ssl_gencert.h | 3 +++ include/haproxy/stick_table.h | 1 + include/haproxy/tools-t.h | 2 ++ include/haproxy/vars.h | 3 +++ include/haproxy/xref.h | 1 + include/import/slz-tables.h | 2 ++ 26 files changed, 57 insertions(+) diff --git a/include/haproxy/bug.h b/include/haproxy/bug.h index f19cf8ca7..af086ef8d 100644 --- a/include/haproxy/bug.h +++ b/include/haproxy/bug.h @@ -28,6 +28,7 @@ #ifndef _HAPROXY_BUG_H #define _HAPROXY_BUG_H +#include #include #include diff --git a/include/haproxy/cbuf-t.h b/include/haproxy/cbuf-t.h index 27d3bf1a8..fee97c380 100644 --- a/include/haproxy/cbuf-t.h +++ b/include/haproxy/cbuf-t.h @@ -27,6 +27,7 @@ #endif #endif +#include #include extern struct pool_head *pool_head_cbuf; diff --git a/include/haproxy/defaults.h b/include/haproxy/defaults.h index 7430c6150..051ca8111 100644 --- a/include/haproxy/defaults.h +++ b/include/haproxy/defaults.h @@ -22,6 +22,8 @@ #ifndef _HAPROXY_DEFAULTS_H #define _HAPROXY_DEFAULTS_H +#include + /* MAX_THREADS defines the highest limit for the global nbthread value. It * defaults to the number of bits in a long integer when threads are enabled * but may be lowered to save resources on embedded systems. diff --git a/include/haproxy/dgram-t.h b/include/haproxy/dgram-t.h index 4e4c2afef..5ed24ef50 100644 --- a/include/haproxy/dgram-t.h +++ b/include/haproxy/dgram-t.h @@ -22,6 +22,8 @@ #ifndef _HAPROXY_HAPROXY_DGRAM_T_H #define _HAPROXY_HAPROXY_DGRAM_T_H +#include +#include #include /* diff --git a/include/haproxy/dynbuf-t.h b/include/haproxy/dynbuf-t.h index b5545ab26..078ea41e7 100644 --- a/include/haproxy/dynbuf-t.h +++ b/include/haproxy/dynbuf-t.h @@ -22,6 +22,7 @@ #ifndef _HAPROXY_DYNBUF_T_H #define _HAPROXY_DYNBUF_T_H +#include /* an element of the list. It represents an object that need to * acquire a buffer to continue its process. */ diff --git a/include/haproxy/filters-t.h b/include/haproxy/filters-t.h index c86ef6f3d..2acacd076 100644 --- a/include/haproxy/filters-t.h +++ b/include/haproxy/filters-t.h @@ -22,6 +22,7 @@ #define _HAPROXY_FILTERS_T_H #include +#include /* Flags set on a filter config */ #define FLT_CFG_FL_HTX 0x00000001 /* The filter can filter HTX streams */ diff --git a/include/haproxy/http_client.h b/include/haproxy/http_client.h index 241ca24ce..93f3fc1af 100644 --- a/include/haproxy/http_client.h +++ b/include/haproxy/http_client.h @@ -1,6 +1,7 @@ #ifndef _HAPROXY_HTTPCLIENT_H #define _HAPROXY_HTTPCLIENT_H +#include #include void httpclient_destroy(struct httpclient *hc); diff --git a/include/haproxy/jwt-t.h b/include/haproxy/jwt-t.h index e94607eea..d4f9e69dc 100644 --- a/include/haproxy/jwt-t.h +++ b/include/haproxy/jwt-t.h @@ -22,6 +22,7 @@ #ifndef _HAPROXY_JWT_T_H #define _HAPROXY_JWT_T_H +#include #include #ifdef USE_OPENSSL diff --git a/include/haproxy/mqtt-t.h b/include/haproxy/mqtt-t.h index 51f55ea51..3af2d1158 100644 --- a/include/haproxy/mqtt-t.h +++ b/include/haproxy/mqtt-t.h @@ -22,6 +22,7 @@ #ifndef _HAPROXY_MQTT_T_H #define _HAPROXY_MQTT_T_H +#include #include /* MQTT protocol version diff --git a/include/haproxy/proto_quic.h b/include/haproxy/proto_quic.h index a0e2b9816..b420f3545 100644 --- a/include/haproxy/proto_quic.h +++ b/include/haproxy/proto_quic.h @@ -21,6 +21,10 @@ #ifndef _HAPROXY_PROTO_QUIC_H #define _HAPROXY_PROTO_QUIC_H +#include +#include +#include + extern struct protocol proto_quic4; extern struct protocol proto_quic6; diff --git a/include/haproxy/proto_sockpair.h b/include/haproxy/proto_sockpair.h index bb0256e8d..e8cb2ac0f 100644 --- a/include/haproxy/proto_sockpair.h +++ b/include/haproxy/proto_sockpair.h @@ -21,6 +21,8 @@ #ifndef _HAPROXY_PROTO_SOCKPAIR_H #define _HAPROXY_PROTO_SOCKPAIR_H +#include + extern struct proto_fam proto_fam_sockpair; extern struct protocol proto_sockpair; diff --git a/include/haproxy/proto_udp.h b/include/haproxy/proto_udp.h index 1c4da77c9..6475bf9e9 100644 --- a/include/haproxy/proto_udp.h +++ b/include/haproxy/proto_udp.h @@ -24,6 +24,8 @@ #ifndef _PROTO_PROTO_UDP_H #define _PROTO_PROTO_UDP_H +#include + extern struct protocol proto_udp4; extern struct protocol proto_udp6; diff --git a/include/haproxy/qpack-dec.h b/include/haproxy/qpack-dec.h index 993f4509e..8ea768968 100644 --- a/include/haproxy/qpack-dec.h +++ b/include/haproxy/qpack-dec.h @@ -21,6 +21,8 @@ #ifndef _HAPROXY_QPACK_DEC_H #define _HAPROXY_QPACK_DEC_H +#include + struct buffer; struct http_hdr; diff --git a/include/haproxy/qpack-tbl-t.h b/include/haproxy/qpack-tbl-t.h index c27c6233f..7b3e2f9c2 100644 --- a/include/haproxy/qpack-tbl-t.h +++ b/include/haproxy/qpack-tbl-t.h @@ -26,6 +26,8 @@ #ifndef _HAPROXY_QPACK_TBL_T_H #define _HAPROXY_QPACK_TBL_T_H +#include + /* * Gcc before 3.0 needs [0] to declare a variable-size array */ diff --git a/include/haproxy/queue-t.h b/include/haproxy/queue-t.h index 8f6a1ec8d..7d9c31cf8 100644 --- a/include/haproxy/queue-t.h +++ b/include/haproxy/queue-t.h @@ -24,6 +24,7 @@ #include #include +#include struct proxy; struct server; diff --git a/include/haproxy/quic_ack-t.h b/include/haproxy/quic_ack-t.h index 95b77f1c9..64182e6db 100644 --- a/include/haproxy/quic_ack-t.h +++ b/include/haproxy/quic_ack-t.h @@ -13,6 +13,10 @@ #ifndef _HAPROXY_QUIC_ACK_T_H #define _HAPROXY_QUIC_ACK_T_H +#include +#include +#include + /* The maximum number of ack ranges to be built in ACK frames */ #define QUIC_MAX_ACK_RANGES 32 diff --git a/include/haproxy/quic_ack.h b/include/haproxy/quic_ack.h index 540e2c08c..baa27ac05 100644 --- a/include/haproxy/quic_ack.h +++ b/include/haproxy/quic_ack.h @@ -13,6 +13,12 @@ #ifndef _HAPROXY_QUIC_ACK_H #define _HAPROXY_QUIC_ACK_H +#include + +struct quic_conn; +struct quic_arng; +struct quic_arngs; + void quic_free_arngs(struct quic_conn *qc, struct quic_arngs *arngs); int quic_update_ack_ranges_list(struct quic_conn *qc, struct quic_arngs *arngs, diff --git a/include/haproxy/quic_rx-t.h b/include/haproxy/quic_rx-t.h index 9ef8e7a2f..6b5a0c4c9 100644 --- a/include/haproxy/quic_rx-t.h +++ b/include/haproxy/quic_rx-t.h @@ -5,6 +5,13 @@ extern struct pool_head *pool_head_quic_conn_rxbuf; extern struct pool_head *pool_head_quic_dgram; extern struct pool_head *pool_head_quic_rx_packet; +#include +#include +#include +#include +#include + +struct quic_version; /* Maximum number of ack-eliciting received packets since the last * ACK frame was sent */ diff --git a/include/haproxy/quic_tls-t.h b/include/haproxy/quic_tls-t.h index ae65149b5..95f77dfc6 100644 --- a/include/haproxy/quic_tls-t.h +++ b/include/haproxy/quic_tls-t.h @@ -21,6 +21,7 @@ #include +#include #include #include #include diff --git a/include/haproxy/quic_tx-t.h b/include/haproxy/quic_tx-t.h index 4653f04d0..697920485 100644 --- a/include/haproxy/quic_tx-t.h +++ b/include/haproxy/quic_tx-t.h @@ -5,6 +5,9 @@ #define QUIC_DGRAM_HEADLEN (sizeof(uint16_t) + sizeof(void *)) #define QUIC_MAX_CC_BUFSIZE (2 * (QUIC_MIN_CC_PKTSIZE + QUIC_DGRAM_HEADLEN)) +#include +#include + extern struct pool_head *pool_head_quic_tx_packet; extern struct pool_head *pool_head_quic_cc_buf; diff --git a/include/haproxy/ssl_gencert.h b/include/haproxy/ssl_gencert.h index 4f9510e01..9065934bf 100644 --- a/include/haproxy/ssl_gencert.h +++ b/include/haproxy/ssl_gencert.h @@ -21,6 +21,9 @@ #define _HAPROXY_SSL_GENCERT_H #ifdef USE_OPENSSL +#include +#include + int ssl_sock_generate_certificate(const char *servername, struct bind_conf *bind_conf, SSL *ssl); int ssl_sock_generate_certificate_from_conn(struct bind_conf *bind_conf, SSL *ssl); SSL_CTX *ssl_sock_assign_generated_cert(unsigned int key, struct bind_conf *bind_conf, SSL *ssl); diff --git a/include/haproxy/stick_table.h b/include/haproxy/stick_table.h index 1c1ed61ce..26b612192 100644 --- a/include/haproxy/stick_table.h +++ b/include/haproxy/stick_table.h @@ -29,6 +29,7 @@ #include #include #include +#include #include extern struct stktable *stktables_list; diff --git a/include/haproxy/tools-t.h b/include/haproxy/tools-t.h index 32d8193fe..38762ac2b 100644 --- a/include/haproxy/tools-t.h +++ b/include/haproxy/tools-t.h @@ -22,6 +22,8 @@ #ifndef _HAPROXY_TOOLS_T_H #define _HAPROXY_TOOLS_T_H +#include + /* size used for max length of decimal representation of long long int. */ #define NB_LLMAX_STR (sizeof("-9223372036854775807")-1) diff --git a/include/haproxy/vars.h b/include/haproxy/vars.h index ebd1f1579..33ee94665 100644 --- a/include/haproxy/vars.h +++ b/include/haproxy/vars.h @@ -25,9 +25,12 @@ #include #include #include +#include #include extern struct vars proc_vars; +struct sample; +struct arg; void vars_init_head(struct vars *vars, enum vars_scope scope); void var_accounting_diff(struct vars *vars, struct session *sess, struct stream *strm, int size); diff --git a/include/haproxy/xref.h b/include/haproxy/xref.h index 42eed5808..25f9d3ca0 100644 --- a/include/haproxy/xref.h +++ b/include/haproxy/xref.h @@ -28,6 +28,7 @@ #ifndef __HAPROXY_XREF_H__ #define __HAPROXY_XREF_H__ +#include #include /* xref is used to create relation between two elements. diff --git a/include/import/slz-tables.h b/include/import/slz-tables.h index 0b3a5b963..6e6d658a2 100644 --- a/include/import/slz-tables.h +++ b/include/import/slz-tables.h @@ -1,3 +1,5 @@ +#include + /* Fixed Huffman table as per RFC1951. * * Lit Value Bits Codes