[tor-commits] [obfsproxy/master] Put back some #includes to make it compile on Windows again.

nickm at torproject.org nickm at torproject.org
Thu Jul 14 16:28:33 UTC 2011


commit 811b7802423578aa77101a4dc2ce8d61ab78fcc7
Author: Zack Weinberg <zackw at panix.com>
Date:   Mon Jul 11 15:15:34 2011 -0700

    Put back some #includes to make it compile on Windows again.
---
 src/network.c |    6 +++++-
 src/socks.c   |    4 ++++
 src/util.c    |    4 ++++
 3 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/src/network.c b/src/network.c
index c6348fa..081af6e 100644
--- a/src/network.c
+++ b/src/network.c
@@ -19,6 +19,10 @@
 #include <event2/listener.h>
 #include <event2/util.h>
 
+#ifdef _WIN32
+#include <ws2tcpip.h>  /* socklen_t */
+#endif
+
 struct listener_t {
   struct evconnlistener *listener;
   protocol_params_t *proto_params;
@@ -391,7 +395,7 @@ output_event_cb(struct bufferevent *bev, short what, void *arg)
          * socks client */
         socks_state_set_address(conn->socks_state, sa);
       }
-      socks_send_reply(conn->socks_state, 
+      socks_send_reply(conn->socks_state,
                        bufferevent_get_output(conn->input), 0);
       /* we sent a socks reply.  We can finally move over to being a regular
          input bufferevent. */
diff --git a/src/socks.c b/src/socks.c
index b403be8..e6d72fd 100644
--- a/src/socks.c
+++ b/src/socks.c
@@ -14,6 +14,10 @@
 
 #include <event2/buffer.h>
 
+#ifdef _WIN32
+#include <ws2tcpip.h> /* sockaddr_in6 */
+#endif
+
 /**
    General SOCKS5 idea:
 
diff --git a/src/util.c b/src/util.c
index 6f5302b..d54c67f 100644
--- a/src/util.c
+++ b/src/util.c
@@ -15,6 +15,10 @@
 #include <event2/dns.h>
 #include <event2/util.h>
 
+#ifdef _WIN32
+#include <ws2tcpip.h> /* addrinfo */
+#endif
+
 /** Any size_t larger than this amount is likely to be an underflow. */
 #define SIZE_T_CEILING  (SIZE_MAX/2 - 16)
 





More information about the tor-commits mailing list