From 64dfa126348e8b5db8742d5f112f2122c25d69fb Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sun, 25 Oct 2026 02:56:11 +0100 Subject: make all headers self containing --- ot_clean.h | 2 ++ ot_http.h | 8 ++++++++ ot_udp.h | 2 ++ ot_vector.h | 5 +++++ 4 files changed, 17 insertions(+) diff --git a/ot_clean.h b/ot_clean.h index e8bcdc1..1484d82 100644 --- a/ot_clean.h +++ b/ot_clean.h @@ -6,6 +6,8 @@ #ifndef OT_CLEAN_H__ #define OT_CLEAN_H__ +#include "trackerlogic.h" + /* The amount of time a clean cycle should take */ #define OT_CLEAN_INTERVAL_MINUTES 2 diff --git a/ot_http.h b/ot_http.h index 004d710..965820f 100644 --- a/ot_http.h +++ b/ot_http.h @@ -6,7 +6,15 @@ #ifndef OT_HTTP_H__ #define OT_HTTP_H__ +#include +#include +#include + +/* Libowfat */ +#include "iob.h" + #include "ot_buf.h" +#include "trackerlogic.h" typedef enum { STRUCT_HTTP_FLAG_WAITINGFORTASK = 1, diff --git a/ot_udp.h b/ot_udp.h index c670175..87d99a9 100644 --- a/ot_udp.h +++ b/ot_udp.h @@ -8,6 +8,8 @@ #include +#include "trackerlogic.h" + void udp_init(int64_t sock, unsigned int worker_count); void udp_kickoff(void); int handle_udp6(int64_t serversocket, struct ot_workstruct *ws); diff --git a/ot_vector.h b/ot_vector.h index 2618363..fbc75f4 100644 --- a/ot_vector.h +++ b/ot_vector.h @@ -6,6 +6,8 @@ #ifndef OT_VECTOR_H__ #define OT_VECTOR_H__ +#include + /* These defines control vectors behaviour */ #define OT_VECTOR_MIN_MEMBERS 2 #define OT_VECTOR_GROW_RATIO 2 @@ -21,6 +23,9 @@ typedef struct { size_t space; } ot_vector; +/* trackerlogic.h needs ot_vector, break circular dependency here */ +#include "trackerlogic.h" + void *binary_search(const void *const key, const void *base, const size_t member_count, const size_t member_size, size_t compare_size, int *exactmatch); void *vector_find_or_insert(ot_vector *vector, void *key, size_t member_size, size_t compare_size, int *exactmatch); ot_peer *vector_find_or_insert_peer(ot_vector *vector, ot_peer const *peer, size_t peer_size, int *exactmatch); -- cgit v1.3