mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 12:28:19 -04:00
Include util-internal.h as needed to build on platforms with no sockaddr_storage
This commit is contained in:
parent
10c834c4df
commit
bbf55150b6
@ -7,6 +7,8 @@
|
||||
|
||||
#include <event2/event-config.h>
|
||||
|
||||
#include "../ipv6-internal.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef WIN32
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user