]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
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 f19cf8ca7ca46ec8a0ea300cf7bdb05383fcbb21..af086ef8df05b69132e6b3f0f5376994071fbffb 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 27d3bf1a8324071c11682015d8b87a8f68767a7e..fee97c3801f2d3dbc7febdf6b0af9364c12d7b5b 100644 (file)
@@ -27,6 +27,7 @@
 #endif
 #endif
 
+#include <stddef.h>
 #include <haproxy/list-t.h>
 
 extern struct pool_head *pool_head_cbuf;
index 7430c6150e49da2d42e3c10a4a3e7f31cf2c6e9f..051ca81110bc52e0caf8c07d360793f91345c71f 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 4e4c2afef51249d117064f7af7ae247be9316e1a..5ed24ef50253a72914dc3148322c4e1eeae427c0 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 b5545ab2697cd8c31b239781b0fd34e0a870caa4..078ea41e7dad133a42613db711e5709fd0ab6346 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 c86ef6f3d77ffc9ce734d797ad06e5142df24c40..2acacd076068e55c4365894c730df8f0fde79cee 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 241ca24ce732a0db06c7dc338c648bd204c80df5..93f3fc1af66e0f70b9a78ead7978cd6d9d8ac30e 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 e94607eea5db13dd43c1fafeb58bd234405e008c..d4f9e69dcd2b06d5491cb99814816937d205d435 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 51f55ea51e9402ea307117b3b21f1c193ce2cb10..3af2d1158bb0bdd1ca935b533c7e1c52d5bffc9d 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 a0e2b98160069b214a93f472bf11586235ca10c2..b420f35459cb8503827dc9cdccb4daa54ff04f67 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 bb0256e8d4cc515dc2e833b679149c21fd4f85e1..e8cb2ac0fdba7e1f3a6aa43e6fb4cd7c72e37c47 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 1c4da77c9533318d80f366f9ffc9b6f165a15912..6475bf9e93415d73bceddb48c4ccdd67113fed7f 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 993f4509ea10612f43649153b965a878e7ab91dc..8ea7689682e274cb9604986df21234b0ebff5b6e 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 c27c6233f94c2aec72aeab2d56045b9413d2e399..7b3e2f9c27d5e8e37b891fe1f1e1535c6004da37 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 8f6a1ec8d54e6ea283d9efbf899fed96486e3234..7d9c31cf84f8fc16c5a127924acff49c331c8790 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 95b77f1c95b0e0868ce42579a2ee3abdabc48e85..64182e6db4389e5622047f56cd1dbd559d4f2d07 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 540e2c08cc253e069a9ce829b4390a47389244f2..baa27ac05c1a560c0f08aed798d069c6d482ba12 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 9ef8e7a2fd9d66a3cf82d9dfc1ee678fda752cda..6b5a0c4c9f463fee50fdbfbf077e7ce9bed5d7a6 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 ae65149b533e549d5f9782b04d90dfc7e23018a2..95f77dfc6740048fdc1dd6c64954a3fa57ebf643 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 4653f04d04cfc41dce6b091bdf0b5c3d21342e6a..6979204859b338146378ec31c8daeacab08f9749 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 4f9510e01e9ae7b46059ad0978fd2bf133a70a59..9065934bf51e4f3bb0cb392db19c9fbe85c55c22 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 1c1ed61ce3b2883c481b2efe6b6ff6e7b0e50d33..26b61219269ac2726326b013c7933fdb065ff1ad 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 32d8193fe9a7e27d1e0e561919dfa271fac24648..38762ac2b7321c28580d9737f4ae0b62bb751c46 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 ebd1f15790372ab1fafd78377f9d7c46ede577d4..33ee946656c20446c641913ca1a965cad6611544 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 42eed5808d9b01ef8895bf4115fb3e70c25e35e1..25f9d3ca008604abe1c01c1650ce971fe37fd0ae 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 0b3a5b96327f26cbf66448139bea9a2348a64a82..6e6d658a2e1f61cc262cd22b66b777dda5da4923 100644 (file)
@@ -1,3 +1,5 @@
+#include <inttypes.h>
+
 /* Fixed Huffman table as per RFC1951.
  *
  *       Lit Value    Bits        Codes