From: Harlan Stenn Date: Sun, 13 Feb 2011 06:25:33 +0000 (-0500) Subject: Include util-internal.h as needed to build on platforms with no sockaddr_storage X-Git-Tag: release-2.0.11-stable~58 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bbf55150b65a5de2edf7c77e3acd1c52caf364a9;p=libevent Include util-internal.h as needed to build on platforms with no sockaddr_storage --- diff --git a/sample/dns-example.c b/sample/dns-example.c index 55318215..e555af56 100644 --- a/sample/dns-example.c +++ b/sample/dns-example.c @@ -7,6 +7,8 @@ #include +#include "../ipv6-internal.h" + #include #ifdef WIN32 diff --git a/sample/http-server.c b/sample/http-server.c index e8b7b408..0739b21d 100644 --- a/sample/http-server.c +++ b/sample/http-server.c @@ -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); diff --git a/test/regress_dns.c b/test/regress_dns.c index 255f613a..086fd429 100644 --- a/test/regress_dns.c +++ b/test/regress_dns.c @@ -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; diff --git a/test/regress_testutils.c b/test/regress_testutils.c index b5bef1ab..8902e631 100644 --- a/test/regress_testutils.c +++ b/test/regress_testutils.c @@ -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; diff --git a/test/test-ratelim.c b/test/test-ratelim.c index edd7ae21..bbbd7608 100644 --- a/test/test-ratelim.c +++ b/test/test-ratelim.c @@ -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;