mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 12:28:19 -04:00
Try to build correctly on platforms with no IPv6 support
This commit is contained in:
parent
9184563e49
commit
713c254d21
@ -59,12 +59,21 @@ typedef int sa_family_t;
|
||||
|
||||
#ifndef _EVENT_HAVE_STRUCT_SOCKADDR_IN6
|
||||
struct sockaddr_in6 {
|
||||
/* This will fail if we find a struct sockaddr that doesn't have
|
||||
* sa_family as the first element. */
|
||||
sa_family_t sin6_family;
|
||||
ev_uint16_t sin6_port;
|
||||
struct in6_addr sin6_addr;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef AF_INET6
|
||||
#define AF_INET6 3333
|
||||
#endif
|
||||
#ifndef PF_INET6
|
||||
#define PF_INET6 AF_INET6
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -38,6 +38,8 @@
|
||||
#endif
|
||||
#include "event2/util.h"
|
||||
|
||||
#include "ipv6-internal.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -213,9 +215,7 @@ struct sockaddr_storage {
|
||||
union {
|
||||
struct sockaddr ss_sa;
|
||||
struct sockaddr_in ss_sin;
|
||||
#ifdef _EVENT_HAVE_STRUCT_SOCKADDR_IN6
|
||||
struct sockaddr_in6 ss_sin6;
|
||||
#endif
|
||||
char ss_padding[128];
|
||||
} ss_union;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user