[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/maint-0.3.5] Fix Windows build.
commit 5c8deef9b67f7bf983dd96164c118317422c236b
Author: Alexander Færøy <ahf@xxxxxxxxxxxxxx>
Date: Fri Feb 5 17:12:52 2021 +0000
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
---
src/test/test_switch_id.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/test/test_switch_id.c b/src/test/test_switch_id.c
index 91277e374f..1c13ad3f24 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
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits