aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2021-02-05 17:12:52 +0000
committerAlexander Færøy <ahf@torproject.org>2021-02-05 17:12:52 +0000
commitaf9107aff2a76d390426079b2d267269e7215027 (patch)
treed5b77b4b0c1b24c1b66d3b7bb8dcad36003cd170
parent6578a3e8659f84152162b643acafacf43487a4a1 (diff)
downloadtor-af9107aff2a76d390426079b2d267269e7215027.tar.gz
tor-af9107aff2a76d390426079b2d267269e7215027.zip
Fix Windows build.
While trying to resolve our CI issues, the Windows build broke with an unused function error: src/test/test_switch_id.c:37:1: error: ‘unprivileged_port_range_start’ defined but not used [-Werror=unused-function] We solve this by moving the `#if !defined(_WIN32)` test above the `unprivileged_port_range_start()` function defintion such that it is included in its body. This is an unreviewed commit. See: tor#40275
-rw-r--r--src/test/test_switch_id.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_switch_id.c b/src/test/test_switch_id.c
index a911269c99..f97af55d17 100644
--- a/src/test/test_switch_id.c
+++ b/src/test/test_switch_id.c
@@ -31,6 +31,8 @@ static const struct {
{ NULL, 0 }
};
+#if !defined(_WIN32)
+
/* Returns the first port that we think we can bind to without special
* permissions. Usually this function returns 1024. */
static uint16_t
@@ -67,8 +69,6 @@ unprivileged_port_range_start(void)
return result;
}
-#if !defined(_WIN32)
-
#define PORT_TEST_RANGE_START 600
#define PORT_TEST_RANGE_END 1024