BUILD: tree-wide: fix a few missing includes in a few files
authorWilly Tarreau <w@1wt.eu>
Wed, 14 Feb 2024 07:41:11 +0000 (08:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 5 Mar 2024 10:50:34 +0000 (11:50 +0100)
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.

26 files changed:
include/haproxy/bug.h
include/haproxy/cbuf-t.h
include/haproxy/defaults.h
include/haproxy/dgram-t.h
include/haproxy/dynbuf-t.h
include/haproxy/filters-t.h
include/haproxy/http_client.h
include/haproxy/jwt-t.h
include/haproxy/mqtt-t.h
include/haproxy/proto_quic.h
include/haproxy/proto_sockpair.h
include/haproxy/proto_udp.h
include/haproxy/qpack-dec.h
include/haproxy/qpack-tbl-t.h
include/haproxy/queue-t.h
include/haproxy/quic_ack-t.h
include/haproxy/quic_ack.h
include/haproxy/quic_rx-t.h
include/haproxy/quic_tls-t.h
include/haproxy/quic_tx-t.h
include/haproxy/ssl_gencert.h
include/haproxy/stick_table.h
include/haproxy/tools-t.h
include/haproxy/vars.h
include/haproxy/xref.h
include/import/slz-tables.h

index f19cf8c..af086ef 100644 (file)
@@ -28,6 +28,7 @@
 #ifndef _HAPROXY_BUG_H
 #define _HAPROXY_BUG_H
 
+#include <stddef.h>
 #include <haproxy/atomic.h>
 #include <haproxy/compiler.h>
 
index 27d3bf1..fee97c3 100644 (file)
@@ -27,6 +27,7 @@
 #endif
 #endif
 
+#include <stddef.h>
 #include <haproxy/list-t.h>
 
 extern struct pool_head *pool_head_cbuf;
index 7430c61..051ca81 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef _HAPROXY_DEFAULTS_H
 #define _HAPROXY_DEFAULTS_H
 
+#include <haproxy/compat.h>
+
 /* 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.
index 4e4c2af..5ed24ef 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef _HAPROXY_HAPROXY_DGRAM_T_H
 #define _HAPROXY_HAPROXY_DGRAM_T_H
 
+#include <haproxy/api-t.h>
+#include <haproxy/thread-t.h>
 #include <arpa/inet.h>
 
 /*
index b5545ab..078ea41 100644 (file)
@@ -22,6 +22,7 @@
 #ifndef _HAPROXY_DYNBUF_T_H
 #define _HAPROXY_DYNBUF_T_H
 
+#include <haproxy/list-t.h>
 
 /* an element of the <buffer_wq> list. It represents an object that need to
  * acquire a buffer to continue its process. */
index c86ef6f..2acacd0 100644 (file)
@@ -22,6 +22,7 @@
 #define _HAPROXY_FILTERS_T_H
 
 #include <haproxy/api-t.h>
+#include <haproxy/buf-t.h>
 
 /* Flags set on a filter config */
 #define FLT_CFG_FL_HTX    0x00000001  /* The filter can filter HTX streams */
index 241ca24..93f3fc1 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _HAPROXY_HTTPCLIENT_H
 #define _HAPROXY_HTTPCLIENT_H
 
+#include <haproxy/buf.h>
 #include <haproxy/http_client-t.h>
 
 void httpclient_destroy(struct httpclient *hc);
index e94607e..d4f9e69 100644 (file)
@@ -22,6 +22,7 @@
 #ifndef _HAPROXY_JWT_T_H
 #define _HAPROXY_JWT_T_H
 
+#include <import/ebmbtree.h>
 #include <haproxy/openssl-compat.h>
 
 #ifdef USE_OPENSSL
index 51f55ea..3af2d11 100644 (file)
@@ -22,6 +22,7 @@
 #ifndef _HAPROXY_MQTT_T_H
 #define _HAPROXY_MQTT_T_H
 
+#include <inttypes.h>
 #include <import/ist.h>
 
 /* MQTT protocol version
index a0e2b98..b420f35 100644 (file)
 #ifndef _HAPROXY_PROTO_QUIC_H
 #define _HAPROXY_PROTO_QUIC_H
 
+#include <import/ebtree.h>
+#include <haproxy/api-t.h>
+#include <haproxy/thread-t.h>
+
 extern struct protocol proto_quic4;
 extern struct protocol proto_quic6;
 
index bb0256e..e8cb2ac 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _HAPROXY_PROTO_SOCKPAIR_H
 #define _HAPROXY_PROTO_SOCKPAIR_H
 
+#include <haproxy/receiver-t.h>
+
 extern struct proto_fam proto_fam_sockpair;
 extern struct protocol proto_sockpair;
 
index 1c4da77..6475bf9 100644 (file)
@@ -24,6 +24,8 @@
 #ifndef _PROTO_PROTO_UDP_H
 #define _PROTO_PROTO_UDP_H
 
+#include <haproxy/receiver-t.h>
+
 extern struct protocol proto_udp4;
 extern struct protocol proto_udp6;
 
index 993f450..8ea7689 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _HAPROXY_QPACK_DEC_H
 #define _HAPROXY_QPACK_DEC_H
 
+#include <inttypes.h>
+
 struct buffer;
 struct http_hdr;
 
index c27c623..7b3e2f9 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef _HAPROXY_QPACK_TBL_T_H
 #define _HAPROXY_QPACK_TBL_T_H
 
+#include <inttypes.h>
+
 /*
  * Gcc before 3.0 needs [0] to declare a variable-size array
  */
index 8f6a1ec..7d9c31c 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <import/ebtree-t.h>
 #include <haproxy/api-t.h>
+#include <haproxy/thread-t.h>
 
 struct proxy;
 struct server;
index 95b77f1..64182e6 100644 (file)
 #ifndef _HAPROXY_QUIC_ACK_T_H
 #define _HAPROXY_QUIC_ACK_T_H
 
+#include <inttypes.h>
+#include <stddef.h>
+#include <import/eb64tree.h>
+
 /* The maximum number of ack ranges to be built in ACK frames */
 #define QUIC_MAX_ACK_RANGES   32
 
index 540e2c0..baa27ac 100644 (file)
 #ifndef _HAPROXY_QUIC_ACK_H
 #define _HAPROXY_QUIC_ACK_H
 
+#include <inttypes.h>
+
+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,
index 9ef8e7a..6b5a0c4 100644 (file)
@@ -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 <import/eb64tree.h>
+#include <haproxy/api-t.h>
+#include <haproxy/quic_cid-t.h>
+#include <inttypes.h>
+#include <sys/socket.h>
+
+struct quic_version;
 /* Maximum number of ack-eliciting received packets since the last
  * ACK frame was sent
  */
index ae65149..95f77df 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <import/ebtree.h>
 
+#include <haproxy/buf-t.h>
 #include <haproxy/ncbuf-t.h>
 #include <haproxy/quic_ack-t.h>
 #include <haproxy/openssl-compat.h>
index 4653f04..6979204 100644 (file)
@@ -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 <import/eb64tree.h>
+#include <haproxy/list-t.h>
+
 extern struct pool_head *pool_head_quic_tx_packet;
 extern struct pool_head *pool_head_quic_cc_buf;
 
index 4f9510e..9065934 100644 (file)
@@ -21,6 +21,9 @@
 #define _HAPROXY_SSL_GENCERT_H
 #ifdef USE_OPENSSL
 
+#include <haproxy/listener-t.h>
+#include <haproxy/ssl_sock-t.h>
+
 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);
index 1c1ed61..26b6121 100644 (file)
@@ -29,6 +29,7 @@
 #include <haproxy/freq_ctr.h>
 #include <haproxy/sample-t.h>
 #include <haproxy/stick_table-t.h>
+#include <haproxy/thread.h>
 #include <haproxy/ticks.h>
 
 extern struct stktable *stktables_list;
index 32d8193..38762ac 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef _HAPROXY_TOOLS_T_H
 #define _HAPROXY_TOOLS_T_H
 
+#include <netinet/in.h>
+
 /* size used for max length of decimal representation of long long int. */
 #define NB_LLMAX_STR (sizeof("-9223372036854775807")-1)
 
index ebd1f15..33ee946 100644 (file)
 #include <haproxy/api-t.h>
 #include <haproxy/session-t.h>
 #include <haproxy/stream-t.h>
+#include <haproxy/thread.h>
 #include <haproxy/vars-t.h>
 
 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);
index 42eed58..25f9d3c 100644 (file)
@@ -28,6 +28,7 @@
 #ifndef __HAPROXY_XREF_H__
 #define __HAPROXY_XREF_H__
 
+#include <haproxy/api.h>
 #include <haproxy/xref-t.h>
 
 /* xref is used to create relation between two elements.
index 0b3a5b9..6e6d658 100644 (file)
@@ -1,3 +1,5 @@
+#include <inttypes.h>
+
 /* Fixed Huffman table as per RFC1951.
  *
  *       Lit Value    Bits        Codes