diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-23 00:17:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-23 00:17:48 -0400 |
commit | cfeafe5e77c9dd5587b1ec553eb1065f0bf841fd (patch) | |
tree | f720f8ec3f8dcc065ea47b2c10c1e2885403e082 /src/or/or.h | |
parent | 1ba1bdee4bd8f3c00e603fe9b0fd2f14eeb60466 (diff) | |
download | tor-cfeafe5e77c9dd5587b1ec553eb1065f0bf841fd.tar.gz tor-cfeafe5e77c9dd5587b1ec553eb1065f0bf841fd.zip |
Use a 64-bit type to hold sockets on win64.
On win64, sockets are of type UINT_PTR; on win32 they're u_int;
elsewhere they're int. The correct windows way to check a socket for
being set is to compare it with INVALID_SOCKET; elsewhere you see if
it is negative.
On Libevent 2, all callbacks take sockets as evutil_socket_t; we've
been passing them int.
This patch should fix compilation and correctness when built for
64-bit windows. Fixes bug 3270.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h index b9d8319ba5..ae56dcd9b4 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -970,7 +970,7 @@ typedef struct connection_t { unsigned int proxy_state:4; /** Our socket; -1 if this connection is closed, or has no socket. */ - evutil_socket_t s; + tor_socket_t s; int conn_array_index; /**< Index into the global connection array. */ struct event *read_event; /**< Libevent event structure. */ struct event *write_event; /**< Libevent event structure. */ |