summaryrefslogtreecommitdiff
path: root/ipv6-internal.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-01-02 21:21:58 +0000
committerNick Mathewson <nickm@torproject.org>2009-01-02 21:21:58 +0000
commit980bcd68f7e49f8c0a9042f64d62e624f8c5f76b (patch)
tree9d4d70f592f2c2e5fdc3f36591f1c5660a11faaa /ipv6-internal.h
parent135591aeab4ac58f91f2109aa4cafdeeb0ce040b (diff)
downloadlibevent-980bcd68f7e49f8c0a9042f64d62e624f8c5f76b.tar.gz
Work better with platforms that do not have ipv6 structures, or that do not have sin_len fields, etc.
svn:r986
Diffstat (limited to 'ipv6-internal.h')
-rw-r--r--ipv6-internal.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/ipv6-internal.h b/ipv6-internal.h
new file mode 100644
index 00000000..0cb40e00
--- /dev/null
+++ b/ipv6-internal.h
@@ -0,0 +1,37 @@
+/* Internal use only: Fake IPv6 structures and values on platforms that
+ * do not have them */
+
+#ifndef _EVENT_IPV6_INTERNAL_H
+#define _EVENT_IPV6_INTERNAL_H
+
+#include <sys/types.h>
+#include "event-config.h"
+#include <event2/util.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _EVENT_HAVE_STRUCT_IN6_ADDR
+struct in6_addr {
+ ev_uint8_t s6_addr[16];
+};
+#endif
+
+#ifndef _EVENT_HAVE_SA_FAMILY_T
+typedef int sa_family_t
+#endif
+
+#ifndef _EVENT_HAVE_STRUCT_SOCKADDR_IN6
+struct sockaddr_in6 {
+ sa_family_t sin6_family;
+ ev_uint16_t sin6_port;
+ struct in6_addr sin6_addr;
+};
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif