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.
This commit is contained in:
Willy Tarreau 2024-02-14 08:41:11 +01:00
parent ac692d7ee5
commit 0a0041d195
26 changed files with 57 additions and 0 deletions

View File

@ -28,6 +28,7 @@
#ifndef _HAPROXY_BUG_H
#define _HAPROXY_BUG_H
#include <stddef.h>
#include <haproxy/atomic.h>
#include <haproxy/compiler.h>

View File

@ -27,6 +27,7 @@
#endif
#endif
#include <stddef.h>
#include <haproxy/list-t.h>
extern struct pool_head *pool_head_cbuf;

View 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.

View 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>
/*

View 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. */

View 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 */

View 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);

View 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

View 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

View File

@ -21,6 +21,10 @@
#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;

View 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;

View 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;

View File

@ -21,6 +21,8 @@
#ifndef _HAPROXY_QPACK_DEC_H
#define _HAPROXY_QPACK_DEC_H
#include <inttypes.h>
struct buffer;
struct http_hdr;

View 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
*/

View File

@ -24,6 +24,7 @@
#include <import/ebtree-t.h>
#include <haproxy/api-t.h>
#include <haproxy/thread-t.h>
struct proxy;
struct server;

View File

@ -13,6 +13,10 @@
#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

View File

@ -13,6 +13,12 @@
#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,

View 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
*/

View 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>

View 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;

View 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);

View 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;

View 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)

View File

@ -25,9 +25,12 @@
#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);

View 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.

View File

@ -1,3 +1,5 @@
#include <inttypes.h>
/* Fixed Huffman table as per RFC1951.
*
* Lit Value Bits Codes