[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r17444: {tor} Define socklen_t before using it in compat.h (in tor/trunk: . src/common)
Author: nickm
Date: 2008-12-02 13:54:47 -0500 (Tue, 02 Dec 2008)
New Revision: 17444
Modified:
tor/trunk/ChangeLog
tor/trunk/src/common/compat.h
Log:
Define socklen_t before using it in compat.h
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2008-12-02 18:53:41 UTC (rev 17443)
+++ tor/trunk/ChangeLog 2008-12-02 18:54:47 UTC (rev 17444)
@@ -23,6 +23,7 @@
- Do not mark smartlist_bsearch_idx() function as ATTR_PURE. This bug
could make gcc generate non-functional binary search code. Bugfix
on 0.2.0.10-alpha.
+ - Build correctly on platforms without socklen_t.
o Minor features (controller):
- Return circuit purposes in response to GETINFO circuit-status. Fixes
Modified: tor/trunk/src/common/compat.h
===================================================================
--- tor/trunk/src/common/compat.h 2008-12-02 18:53:41 UTC (rev 17443)
+++ tor/trunk/src/common/compat.h 2008-12-02 18:54:47 UTC (rev 17444)
@@ -302,6 +302,10 @@
/* ===== 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 @@
#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