mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 13:04:23 -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
|
#ifndef _EVENT_HAVE_STRUCT_SOCKADDR_IN6
|
||||||
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;
|
sa_family_t sin6_family;
|
||||||
ev_uint16_t sin6_port;
|
ev_uint16_t sin6_port;
|
||||||
struct in6_addr sin6_addr;
|
struct in6_addr sin6_addr;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef AF_INET6
|
||||||
|
#define AF_INET6 3333
|
||||||
|
#endif
|
||||||
|
#ifndef PF_INET6
|
||||||
|
#define PF_INET6 AF_INET6
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -38,6 +38,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "event2/util.h"
|
#include "event2/util.h"
|
||||||
|
|
||||||
|
#include "ipv6-internal.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@ -213,9 +215,7 @@ struct sockaddr_storage {
|
|||||||
union {
|
union {
|
||||||
struct sockaddr ss_sa;
|
struct sockaddr ss_sa;
|
||||||
struct sockaddr_in ss_sin;
|
struct sockaddr_in ss_sin;
|
||||||
#ifdef _EVENT_HAVE_STRUCT_SOCKADDR_IN6
|
|
||||||
struct sockaddr_in6 ss_sin6;
|
struct sockaddr_in6 ss_sin6;
|
||||||
#endif
|
|
||||||
char ss_padding[128];
|
char ss_padding[128];
|
||||||
} ss_union;
|
} ss_union;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user