]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Define socklen_t before using it in compat.h
authorNick Mathewson <nickm@torproject.org>
Tue, 2 Dec 2008 18:54:47 +0000 (18:54 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 2 Dec 2008 18:54:47 +0000 (18:54 +0000)
svn:r17444

ChangeLog
src/common/compat.h

index 5d2975034daf77b0b9258f2b8e1d76707bb2a0a5..8e2eb839252a97c17fc9fa73cbb3598c51f7a2c5 100644 (file)
--- 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
index 292ff757be321fc7f3e54f9059330d8959069d7a..aab49b208e13ac252a5f8b993dd9b833b6ed1d2f 100644 (file)
@@ -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