summaryrefslogtreecommitdiff
path: root/src/common/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/compat.h')
-rw-r--r--src/common/compat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index 87e100c121..91475d0187 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -135,6 +135,10 @@ int replace_file(const char *from, const char *to);
#define tor_close_socket(s) close(s)
#endif
+#if (SIZEOF_SOCKLEN_T == 0)
+typedef int socklen_t;
+#endif
+
/* Now that we use libevent, all real sockets are safe for polling ... or
* if they aren't, libevent will help us. */
#define SOCKET_IS_POLLABLE(fd) ((fd)>=0)