[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Include ht.h in all headers that use HT_ENTRY()



commit 2f7a2c42d2dcc36f8d6b58aff67f6a7d388f81ed
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Dec 16 13:17:11 2019 -0500

    Include ht.h in all headers that use HT_ENTRY()
    
    Without this change, compilation success depends on include order in
    several tricky ways.
---
 src/core/or/.may_include            | 4 +++-
 src/core/or/channel.h               | 1 +
 src/core/or/circuit_st.h            | 1 +
 src/core/or/scheduler.h             | 3 ++-
 src/feature/dirauth/keypin.h        | 2 ++
 src/feature/hs/hs_service.h         | 2 ++
 src/feature/nodelist/microdesc_st.h | 2 ++
 src/feature/nodelist/node_st.h      | 1 +
 src/feature/relay/dns_structs.h     | 3 ++-
 src/feature/stats/geoip_stats.h     | 1 +
 10 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/core/or/.may_include b/src/core/or/.may_include
index 5173e8a2b..beb12f155 100644
--- a/src/core/or/.may_include
+++ b/src/core/or/.may_include
@@ -35,4 +35,6 @@ trunnel/*.h
 core/mainloop/*.h
 core/proto/*.h
 core/crypto/*.h
-core/or/*.h
\ No newline at end of file
+core/or/*.h
+
+ext/*.h
diff --git a/src/core/or/channel.h b/src/core/or/channel.h
index 7f5bd9bf2..d001b8a77 100644
--- a/src/core/or/channel.h
+++ b/src/core/or/channel.h
@@ -14,6 +14,7 @@
 #include "lib/container/handles.h"
 #include "lib/crypt_ops/crypto_ed25519.h"
 
+#include "ext/ht.h"
 #include "tor_queue.h"
 
 #define tor_timer_t timeout
diff --git a/src/core/or/circuit_st.h b/src/core/or/circuit_st.h
index 929f3840e..19cfa9838 100644
--- a/src/core/or/circuit_st.h
+++ b/src/core/or/circuit_st.h
@@ -17,6 +17,7 @@
 #include "lib/container/handles.h"
 
 #include "core/or/cell_queue_st.h"
+#include "ext/ht.h"
 
 struct hs_token_t;
 struct circpad_machine_spec_t;
diff --git a/src/core/or/scheduler.h b/src/core/or/scheduler.h
index b82f8730b..03cb45675 100644
--- a/src/core/or/scheduler.h
+++ b/src/core/or/scheduler.h
@@ -138,6 +138,8 @@ MOCK_DECL(void, scheduler_channel_has_waiting_cells, (channel_t *chan));
  *****************************************************************************/
 #ifdef SCHEDULER_PRIVATE_
 
+#include "ext/ht.h"
+
 /*********************************
  * Defined in scheduler.c
  *********************************/
@@ -215,4 +217,3 @@ scheduler_t *get_vanilla_scheduler(void);
 #endif /* defined(SCHEDULER_PRIVATE_) */
 
 #endif /* !defined(TOR_SCHEDULER_H) */
-
diff --git a/src/feature/dirauth/keypin.h b/src/feature/dirauth/keypin.h
index d77f6fc5f..0042cfafc 100644
--- a/src/feature/dirauth/keypin.h
+++ b/src/feature/dirauth/keypin.h
@@ -45,6 +45,8 @@ int keypin_check_lone_rsa(const uint8_t *rsa_id_digest);
 
 #ifdef KEYPIN_PRIVATE
 
+#include "ext/ht.h"
+
 /**
  * In-memory representation of a key-pinning table entry.
  */
diff --git a/src/feature/hs/hs_service.h b/src/feature/hs/hs_service.h
index 1c2d9e97c..2d7ce9b85 100644
--- a/src/feature/hs/hs_service.h
+++ b/src/feature/hs/hs_service.h
@@ -21,6 +21,8 @@
 /* Trunnel */
 #include "trunnel/hs/cell_establish_intro.h"
 
+#include "ext/ht.h"
+
 /** When loading and configuring a service, this is the default version it will
  * be configured for as it is possible that no HiddenServiceVersion is
  * present. */
diff --git a/src/feature/nodelist/microdesc_st.h b/src/feature/nodelist/microdesc_st.h
index 58b063057..3828371b9 100644
--- a/src/feature/nodelist/microdesc_st.h
+++ b/src/feature/nodelist/microdesc_st.h
@@ -17,6 +17,8 @@ struct ed25519_public_key_t;
 struct nodefamily_t;
 struct short_policy_t;
 
+#include "ext/ht.h"
+
 /** A microdescriptor is the smallest amount of information needed to build a
  * circuit through a router.  They are generated by the directory authorities,
  * using information from the uploaded routerinfo documents.  They are not
diff --git a/src/feature/nodelist/node_st.h b/src/feature/nodelist/node_st.h
index 6ad10bb85..aa4066d99 100644
--- a/src/feature/nodelist/node_st.h
+++ b/src/feature/nodelist/node_st.h
@@ -14,6 +14,7 @@
 
 #include "feature/hs/hsdir_index_st.h"
 #include "lib/crypt_ops/crypto_ed25519.h"
+#include "ext/ht.h"
 
 /** A node_t represents a Tor router.
  *
diff --git a/src/feature/relay/dns_structs.h b/src/feature/relay/dns_structs.h
index e128746f8..6263c4ceb 100644
--- a/src/feature/relay/dns_structs.h
+++ b/src/feature/relay/dns_structs.h
@@ -13,6 +13,8 @@
 #ifndef TOR_DNS_STRUCTS_H
 #define TOR_DNS_STRUCTS_H
 
+#include "ext/ht.h"
+
 /** Longest hostname we're willing to resolve. */
 #define MAX_ADDRESSLEN 256
 
@@ -99,4 +101,3 @@ typedef struct cached_resolve_t {
 } cached_resolve_t;
 
 #endif /* !defined(TOR_DNS_STRUCTS_H) */
-
diff --git a/src/feature/stats/geoip_stats.h b/src/feature/stats/geoip_stats.h
index 2fc62b546..95ca86e65 100644
--- a/src/feature/stats/geoip_stats.h
+++ b/src/feature/stats/geoip_stats.h
@@ -13,6 +13,7 @@
 #define TOR_GEOIP_STATS_H
 
 #include "core/or/dos.h"
+#include "ext/ht.h"
 
 /** Indicates an action that we might be noting geoip statistics on.
  * Note that if we're noticing CONNECT, we're a bridge, and if we're noticing



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits