diff options
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index 292ff757be..aab49b208e 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -302,6 +302,10 @@ void tor_lockfile_unlock(tor_lockfile_t *lockfile); /* ===== Net compatibility */ +#if (SIZEOF_SOCKLEN_T == 0) +typedef int socklen_t; +#endif + int tor_close_socket(int s); int tor_open_socket(int domain, int type, int protocol); int tor_accept_socket(int sockfd, struct sockaddr *addr, socklen_t *len); @@ -315,10 +319,6 @@ int get_n_open_sockets(void); #define tor_socket_recv(s, buf, len, flags) recv(s, buf, len, flags) #endif -#if (SIZEOF_SOCKLEN_T == 0) -typedef int socklen_t; -#endif - /* Define struct in6_addr on platforms that do not have it. Generally, * these platforms are ones without IPv6 support, but we want to have * a working in6_addr there anyway, so we can use it to parse IPv6 |