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/eventdns.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/eventdns.h')
-rw-r--r-- | src/or/eventdns.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/eventdns.h b/src/or/eventdns.h index 2fe4ac9371..3ff8bba4b6 100644 --- a/src/or/eventdns.h +++ b/src/or/eventdns.h @@ -319,7 +319,7 @@ typedef void (*evdns_request_callback_fn_type)(struct evdns_server_request *, vo #define EVDNS_CLASS_INET 1 -struct evdns_server_port *evdns_add_server_port(int socket, int is_tcp, evdns_request_callback_fn_type callback, void *user_data); +struct evdns_server_port *evdns_add_server_port(tor_socket_t socket, int is_tcp, evdns_request_callback_fn_type callback, void *user_data); void evdns_close_server_port(struct evdns_server_port *port); int evdns_server_request_add_reply(struct evdns_server_request *req, int section, const char *name, int type, int class, int ttl, int datalen, int is_name, const char *data); |