diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-02 18:56:15 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-02 18:56:15 +0000 |
commit | 0d091964dd9b56d8921fc7bc75b0a5f1846724c9 (patch) | |
tree | 76de62e661cbb91db6bc7275ac702028c8ce235e /src/common/compat.h | |
parent | 7e1123bd7e1601a9123d5130fd13837bfd8e87c8 (diff) | |
download | tor-0d091964dd9b56d8921fc7bc75b0a5f1846724c9.tar.gz tor-0d091964dd9b56d8921fc7bc75b0a5f1846724c9.zip |
Backport: Define socklen_t before using it in compat.h
svn:r17445
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 8cf7302595..b1e96dce2c 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -271,6 +271,10 @@ int touch_file(const char *fname); /* ===== 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); @@ -284,10 +288,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 |