diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-01-17 16:38:47 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-01-17 16:38:47 -0500 |
commit | dea0720dadea8f3915901833115726f4ba0d48f4 (patch) | |
tree | 95541d12cac8a36180f64e2dbc83c4f3cff38a7f /src/common | |
parent | 6e8c2a3e46e3578b0268d422b1753995d18fb734 (diff) | |
download | tor-dea0720dadea8f3915901833115726f4ba0d48f4.tar tor-dea0720dadea8f3915901833115726f4ba0d48f4.tar.gz |
Warn if sizeof(tor_socket_t) != sizeof(SOCKET)
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/compat.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index 7f8903733..1f9066d20 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -2889,6 +2889,11 @@ network_init(void) log_warn(LD_NET,"Error initializing windows network layer: code was %d",r); return -1; } + if (sizeof(SOCKET) != sizeof(tor_socket_t)) { + log_warn(LD_BUG,"The tor_socket_t type does not match SOCKET in size; Tor " + "might not work. (Sizes are %d and %d respectively.)", + (int)sizeof(tor_socket_t), (int)sizeof(SOCKET)); + } /* WSAData.iMaxSockets might show the max sockets we're allowed to use. * We might use it to complain if we're trying to be a server but have * too few sockets available. */ |