aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-04-17 11:14:05 +1000
committerteor <teor@torproject.org>2019-04-17 11:14:05 +1000
commit031ed59dbaf62d9cebd09f98f563c228fe6822f6 (patch)
tree3bf6b51ca809fddc43bd55e7956f45d5d8787bc7
parent05d25d06b62a9ee2cc77e44a66be2d9a95cae636 (diff)
downloadtor-031ed59dbaf62d9cebd09f98f563c228fe6822f6.tar.gz
tor-031ed59dbaf62d9cebd09f98f563c228fe6822f6.zip
test/relay: add a missing typedef
In 0.3.4 and later, these functions are declared in rephist.h: STATIC uint64_t find_largest_max(bw_array_t *b); STATIC void commit_max(bw_array_t *b); STATIC void advance_obs(bw_array_t *b); But in 0.2.9, they are declared in rephist.c and test_relay.c. So compilers fail with a "must use 'struct' tag" error. We add the missing struct typedef in test_relay.c, to match the declarations in rephist.c. (Merge commit 813019cc57 moves these functions into rephist.h instead.) Fixes bug 30184; not in any released version of Tor.
-rw-r--r--src/test/test_relay.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test_relay.c b/src/test/test_relay.c
index 57dcb2406a..d4ebb23382 100644
--- a/src/test/test_relay.c
+++ b/src/test/test_relay.c
@@ -19,6 +19,8 @@
static or_circuit_t * new_fake_orcirc(channel_t *nchan, channel_t *pchan);
static void test_relay_append_cell_to_circuit_queue(void *arg);
+
+typedef struct bw_array_t bw_array_t;
uint64_t find_largest_max(bw_array_t *b);
void commit_max(bw_array_t *b);
void advance_obs(bw_array_t *b);