[tor-commits] [stegotorus/master] FreeBSD portability fixes

zwol at torproject.org zwol at torproject.org
Fri Jul 20 23:17:06 UTC 2012


commit 572cfd2fc2071dd3ecd3c3ecdb41d77285b468fc
Author: Zack Weinberg <zackw at cmu.edu>
Date:   Mon Feb 13 18:48:57 2012 +0000

    FreeBSD portability fixes
---
 src/main.cc                |    2 +-
 src/socks.cc               |    1 +
 src/test/unittest_socks.cc |    1 +
 src/util.cc                |    4 ++--
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/main.cc b/src/main.cc
index 8b6ca37..d7f3d87 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -105,8 +105,8 @@ static void
 lethal_signal(int signum, siginfo_t *si, void *)
 {
   char faultmsg[80];
-  int n;
 #ifdef HAVE_EXECINFO_H
+  int n;
   void *backtracebuf[256];
 #endif
 
diff --git a/src/socks.cc b/src/socks.cc
index dfcb745..05da3f4 100644
--- a/src/socks.cc
+++ b/src/socks.cc
@@ -8,6 +8,7 @@
 #include "socks.h"
 
 #include <errno.h>
+#include <netinet/in.h>
 
 #include <event2/buffer.h>
 
diff --git a/src/test/unittest_socks.cc b/src/test/unittest_socks.cc
index b46aedc..84c256b 100644
--- a/src/test/unittest_socks.cc
+++ b/src/test/unittest_socks.cc
@@ -9,6 +9,7 @@
 #include "socks.h"
 
 #include <event2/buffer.h>
+#include <netinet/in.h>
 
 /* All the tests below use this test environment.  Some of them
    do not need both evbuffers, but we give them two anyway.  */
diff --git a/src/util.cc b/src/util.cc
index 9987871..9cca1fd 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -10,9 +10,9 @@
 #include <unistd.h>
 
 #include <event2/dns.h>
-#ifndef _WIN32
+
+#include <netinet/in.h>
 #include <arpa/inet.h>
-#endif
 #ifdef AF_LOCAL
 #include <sys/un.h>
 #endif





More information about the tor-commits mailing list