[tor-commits] [tor/master] Fix build on FreeBSD post-refactor

nickm at torproject.org nickm at torproject.org
Tue Jul 10 18:52:11 UTC 2018


commit 6d58c20d944b7b9056fc260f29452d2627b3e9f5
Author: Neel Chauhan <neel at neelc.org>
Date:   Tue Jul 10 12:15:49 2018 -0400

    Fix build on FreeBSD post-refactor
---
 changes/bug26715              | 5 +++++
 src/core/or/connection_edge.c | 7 +++++++
 src/lib/net/ipv6.h            | 9 +++++++++
 3 files changed, 21 insertions(+)

diff --git a/changes/bug26715 b/changes/bug26715
new file mode 100644
index 000000000..85fc9d1ed
--- /dev/null
+++ b/changes/bug26715
@@ -0,0 +1,5 @@
+  o Major bugfixes (compilation):
+    - Include additional headers in connection_edge.c and ipv6.h in order
+      to build correctly on FreeBSD post-refactor. Fixes bug 26715; bugfix
+      on 0.3.5.1-alpha. Patch by Neel Chauhan.
+
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c
index 8e8a5e21c..c51e42800 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -129,6 +129,13 @@
 #endif
 #endif /* defined(HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H) */
 
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+
 #if defined(HAVE_NET_IF_H) && defined(HAVE_NET_PFVAR_H)
 #include <net/if.h>
 #include <net/pfvar.h>
diff --git a/src/lib/net/ipv6.h b/src/lib/net/ipv6.h
index 0a12e046a..fd3fc12ba 100644
--- a/src/lib/net/ipv6.h
+++ b/src/lib/net/ipv6.h
@@ -8,9 +8,18 @@
 
 #include "orconfig.h"
 #include <stddef.h>
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
 #ifdef HAVE_NETINET_IN6_H
 #include <netinet/in6.h>
 #endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
 #ifdef _WIN32
 #include <winsock2.h>
 #include <ws2tcpip.h>





More information about the tor-commits mailing list