configure.ac: autodetect sin_len member in struct sockaddr_in.
This fixes a build issue on Haiku as it does have sin_len. Tested on Linux as well. For some reason AC_CHECK_MEMBER doesn't generate the proper define in config.h.in, so I used AC_CHECK_MEMBERS.
This commit is contained in:
@@ -81,8 +81,7 @@ class IPv4Address {
|
||||
static constexpr struct sockaddr_in Construct(struct in_addr address,
|
||||
uint16_t port) {
|
||||
return {
|
||||
#if defined(__APPLE__) || \
|
||||
defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
|
||||
sizeof(struct sockaddr_in),
|
||||
#endif
|
||||
AF_INET,
|
||||
|
Reference in New Issue
Block a user