From 92385a9f3cf0484232bfbc5740ad47b1e2b2d356 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 28 Feb 2012 13:21:05 -0500 Subject: [PATCH] Replace sole internal user of socklen_t with ev_socklen_t This lets us remove the socklen_t definition from util-internal.h, so that util-internal.h no longer confuses ws2tcpip.h --- listener.c | 6 +----- util-internal.h | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/listener.c b/listener.c index 3f6b44f9..4724ca1f 100644 --- a/listener.c +++ b/listener.c @@ -387,11 +387,7 @@ listener_read_cb(evutil_socket_t fd, short what, void *p) LOCK(lev); while (1) { struct sockaddr_storage ss; -#ifdef _WIN32 - int socklen = sizeof(ss); -#else - socklen_t socklen = sizeof(ss); -#endif + ev_socklen_t socklen = sizeof(ss); evutil_socket_t new_fd = evutil_accept4(fd, (struct sockaddr*)&ss, &socklen, lev->accept4_flags); if (new_fd < 0) break; diff --git a/util-internal.h b/util-internal.h index fcdb6da9..afa908c6 100644 --- a/util-internal.h +++ b/util-internal.h @@ -112,10 +112,6 @@ extern "C" { #endif -#ifdef _EVENT_socklen_t -#define socklen_t _EVENT_socklen_t -#endif - /* Arguments for shutdown() */ #ifdef SHUT_RD #define EVUTIL_SHUT_RD SHUT_RD -- 2.40.0