aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_switch_id.c
diff options
context:
space:
mode:
authorcypherpunks <cypherpunks@torproject.org>2015-12-16 22:11:20 +0100
committerNick Mathewson <nickm@torproject.org>2015-12-17 08:34:27 -0500
commit596f9a4b4cf9211827284905069166972aaf1e3b (patch)
treeb1d788e3cfcbafa803bbfdcef02e967ecf04d9ac /src/test/test_switch_id.c
parent46694f28627d94f45b7acc8562cc70f80aa8f23b (diff)
downloadtor-596f9a4b4cf9211827284905069166972aaf1e3b.tar.gz
tor-596f9a4b4cf9211827284905069166972aaf1e3b.zip
Use a Windows specific socket error code
Diffstat (limited to 'src/test/test_switch_id.c')
-rw-r--r--src/test/test_switch_id.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test_switch_id.c b/src/test/test_switch_id.c
index e956f33b73..9b093671e8 100644
--- a/src/test/test_switch_id.c
+++ b/src/test/test_switch_id.c
@@ -62,7 +62,11 @@ check_can_bind_low_ports(void)
} else if (errno == EACCES || errno == EPERM) {
/* Got a permission-denied error. */
return 0;
+#if defined(_WIN32)
+ } else if (errno == WSAEADDRINUSE) {
+#else
} else if (errno == EADDRINUSE) {
+#endif
/* Huh; somebody is using that port. */
} else {
perror("bind");