Include util-internal.h as needed to build on platforms with no sockaddr_storage

This commit is contained in:
Harlan Stenn 2011-02-13 01:25:33 -05:00 committed by Nick Mathewson
parent 10c834c4df
commit bbf55150b6
5 changed files with 12 additions and 0 deletions

View File

@ -7,6 +7,8 @@
#include <event2/event-config.h>
#include "../ipv6-internal.h"
#include <sys/types.h>
#ifdef WIN32

View 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);

View 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;

View 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;

View 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;