From cfeafe5e77c9dd5587b1ec553eb1065f0bf841fd Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 23 May 2011 00:17:48 -0400 Subject: 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. --- src/or/eventdns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/or/eventdns.c') diff --git a/src/or/eventdns.c b/src/or/eventdns.c index fc005df2d..d06fb2cf2 100644 --- a/src/or/eventdns.c +++ b/src/or/eventdns.c @@ -1560,7 +1560,7 @@ evdns_request_data_build(const char *const name, const size_t name_len, /* exported function */ struct evdns_server_port * -evdns_add_server_port(int socket, int is_tcp, evdns_request_callback_fn_type cb, void *user_data) +evdns_add_server_port(tor_socket_t socket, int is_tcp, evdns_request_callback_fn_type cb, void *user_data) { struct evdns_server_port *port; if (!(port = mm_malloc(sizeof(struct evdns_server_port)))) -- cgit v1.2.3