mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user