[tor-commits] [tor/master] Avoid double-typedef errors on freebsd.

nickm at torproject.org nickm at torproject.org
Mon Jul 10 13:29:08 UTC 2017


commit db71d42868fd57904840d10e49ee28bbb3b25039
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Jul 10 09:28:50 2017 -0400

    Avoid double-typedef errors on freebsd.
---
 src/or/hs_client.c |  1 +
 src/or/or.h        | 12 ++++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/or/hs_client.c b/src/or/hs_client.c
index 12fcf3a..051490a 100644
--- a/src/or/hs_client.c
+++ b/src/or/hs_client.c
@@ -8,6 +8,7 @@
 
 #include "or.h"
 #include "hs_circuit.h"
+#include "hs_ident.h"
 #include "connection_edge.h"
 #include "rendclient.h"
 
diff --git a/src/or/or.h b/src/or/or.h
index 5a9ad59..996a770 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -847,9 +847,9 @@ rend_data_v2_t *TO_REND_DATA_V2(const rend_data_t *d)
 }
 
 /* Stub because we can't include hs_ident.h. */
-typedef struct hs_ident_edge_conn_t hs_ident_edge_conn_t;
-typedef struct hs_ident_dir_conn_t hs_ident_dir_conn_t;
-typedef struct hs_ident_circuit_t hs_ident_circuit_t;
+struct hs_ident_edge_conn_t;
+struct hs_ident_dir_conn_t;
+struct hs_ident_circuit_t;
 
 /** Time interval for tracking replays of DH public keys received in
  * INTRODUCE2 cells.  Used only to avoid launching multiple
@@ -1641,7 +1641,7 @@ typedef struct edge_connection_t {
   /* Hidden service connection identifier for edge connections. Used by the HS
    * client-side code to identify client SOCKS connections and by the
    * service-side code to match HS circuits with their streams. */
-  hs_ident_edge_conn_t *hs_ident;
+  struct hs_ident_edge_conn_t *hs_ident;
 
   uint32_t address_ttl; /**< TTL for address-to-addr mapping on exit
                          * connection.  Exit connections only. */
@@ -1796,7 +1796,7 @@ typedef struct dir_connection_t {
   /* Hidden service connection identifier for dir connections: Used by HS
      client-side code to fetch HS descriptors, and by the service-side code to
      upload descriptors. */
-  hs_ident_dir_conn_t *hs_ident;
+  struct hs_ident_dir_conn_t *hs_ident;
 
   /** If this is a one-hop connection, tracks the state of the directory guard
    * for this connection (if any). */
@@ -3205,7 +3205,7 @@ typedef struct origin_circuit_t {
 
   /** Holds hidden service identifier on either client or service side. This
    * is for both introduction and rendezvous circuit. */
-  hs_ident_circuit_t *hs_ident;
+  struct hs_ident_circuit_t *hs_ident;
 
   /** Holds the data that the entry guard system uses to track the
    * status of the guard this circuit is using, and thereby to determine



More information about the tor-commits mailing list