]> granicus.if.org Git - libevent/commitdiff
Include util-internal.h as needed to build on platforms with no sockaddr_storage
authorHarlan Stenn <stenn@ntp.org>
Sun, 13 Feb 2011 06:25:33 +0000 (01:25 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 22 Feb 2011 05:24:54 +0000 (00:24 -0500)
sample/dns-example.c
sample/http-server.c
test/regress_dns.c
test/regress_testutils.c
test/test-ratelim.c

index 5531821576a746a9d56e5c0cdf2fd16c2f4a2ec1..e555af562eb2ae1e018f2a5e131c04075b4d4c31 100644 (file)
@@ -7,6 +7,8 @@
 
 #include <event2/event-config.h>
 
+#include "../ipv6-internal.h"
+
 #include <sys/types.h>
 
 #ifdef WIN32
index e8b7b408dd45336dc28e4e5affcdd23d74f9c0ba..0739b21db1c936a81a4114717b19badd6e2e6b17 100644 (file)
@@ -41,6 +41,8 @@
 # endif
 #endif
 
+#include <../util-internal.h>
+
 #ifdef WIN32
 #define stat _stat
 #define fstat _fstat
@@ -369,9 +371,11 @@ main(int argc, char **argv)
                if (ss.ss_family == AF_INET) {
                        got_port = ntohs(((struct sockaddr_in*)&ss)->sin_port);
                        inaddr = &((struct sockaddr_in*)&ss)->sin_addr;
+#ifdef AF_INET6
                } else if (ss.ss_family == AF_INET6) {
                        got_port = ntohs(((struct sockaddr_in6*)&ss)->sin6_port);
                        inaddr = &((struct sockaddr_in6*)&ss)->sin6_addr;
+#endif
                } else {
                        fprintf(stderr, "Weird address family %d\n",
                            ss.ss_family);
index 255f613a9b15e1ba91a120fb3312127d33a87499..086fd429143f18bfa3fd53422ec8e728b7e598ba 100644 (file)
@@ -71,6 +71,8 @@
 #include "regress.h"
 #include "regress_testutils.h"
 
+#include "../util-internal.h"
+
 static int dns_ok = 0;
 static int dns_got_cancel = 0;
 static int dns_err = 0;
index b5bef1abd7816c1011b6b182c4b43b7e3c21c3f3..8902e63180529037dac742ee31f98bc628a76a45 100644 (file)
@@ -68,6 +68,8 @@
 #include "regress.h"
 #include "regress_testutils.h"
 
+#include "../util-internal.h"
+
 /* globals */
 static struct evdns_server_port *dns_port;
 evutil_socket_t dns_sock = -1;
index edd7ae21607958b1add187d701e9bbbe07d7223a..bbbd760809015c97f59fbc08ab30c48e052246c4 100644 (file)
@@ -49,6 +49,8 @@
 #include "event2/listener.h"
 #include "event2/thread.h"
 
+#include "../util-internal.h"
+
 static int cfg_verbose = 0;
 static int cfg_help = 0;