From: Willy Tarreau Date: Wed, 14 Feb 2024 07:41:11 +0000 (+0100) Subject: BUILD: tree-wide: fix a few missing includes in a few files X-Git-Tag: v3.0-dev5~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a0041d1955a7715024a78db93b56c1a58517789;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/haproxy/bug.h b/include/haproxy/bug.h index f19cf8ca7c..af086ef8df 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 27d3bf1a83..fee97c3801 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 7430c6150e..051ca81110 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 4e4c2afef5..5ed24ef502 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 b5545ab269..078ea41e7d 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 c86ef6f3d7..2acacd0760 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 241ca24ce7..93f3fc1af6 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 e94607eea5..d4f9e69dcd 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 51f55ea51e..3af2d1158b 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 a0e2b98160..b420f35459 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 bb0256e8d4..e8cb2ac0fd 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 1c4da77c95..6475bf9e93 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 993f4509ea..8ea7689682 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 c27c6233f9..7b3e2f9c27 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 8f6a1ec8d5..7d9c31cf84 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 95b77f1c95..64182e6db4 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 540e2c08cc..baa27ac05c 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 9ef8e7a2fd..6b5a0c4c9f 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 ae65149b53..95f77dfc67 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 4653f04d04..6979204859 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 4f9510e01e..9065934bf5 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 1c1ed61ce3..26b6121926 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 32d8193fe9..38762ac2b7 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 ebd1f15790..33ee946656 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 42eed5808d..25f9d3ca00 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 0b3a5b9632..6e6d658a2e 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