summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-12-02 18:54:47 +0000
committerNick Mathewson <nickm@torproject.org>2008-12-02 18:54:47 +0000
commit60738daf854ee592b41a140dbc2ea226729c0deb (patch)
tree093a7ed23daeaf45b1b5ff383e473c9e606dcdac
parent2d8f7a4ff63415568a30a20f3fbd067e9898b99b (diff)
downloadtor-60738daf854ee592b41a140dbc2ea226729c0deb.tar.gz
tor-60738daf854ee592b41a140dbc2ea226729c0deb.zip
Define socklen_t before using it in compat.h
svn:r17444
-rw-r--r--ChangeLog1
-rw-r--r--src/common/compat.h8
2 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 5d2975034d..8e2eb83925 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@ Changes in version 0.2.1.8-alpha - 2008-??-??
- 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
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