diff options
author | Peer Stritzinger <[email protected]> | 2012-02-15 21:15:18 +0100 |
---|---|---|
committer | Gustav Simonsson <[email protected]> | 2012-02-21 14:43:54 +0100 |
commit | 4f3dd18814bbcc75608bbb56a09b844137b76823 (patch) | |
tree | c6c5b8ba4a332a9c4e32bb9140e793c33fe2e90b /erts/emulator/drivers | |
parent | 520ddbc83ec87bcec262680bd915184182e3998e (diff) | |
download | otp-4f3dd18814bbcc75608bbb56a09b844137b76823.tar.gz otp-4f3dd18814bbcc75608bbb56a09b844137b76823.tar.bz2 otp-4f3dd18814bbcc75608bbb56a09b844137b76823.zip |
Add missing HAVE_IN6 && AF_INET6 ifdef
This prevents building for operating systems that do not yet have IPv6
compatible socket API. Error can be reproduced by (cross)building for
a os that doesn't have these headers. This will abort with a error
about incomplete type 'struct in6_addr'. All other uses of IPv6 API
in inet_drv.c are conditionalized like in the patch.
Diffstat (limited to 'erts/emulator/drivers')
-rw-r--r-- | erts/emulator/drivers/common/inet_drv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c index 47a99fdbe6..33523d8e57 100644 --- a/erts/emulator/drivers/common/inet_drv.c +++ b/erts/emulator/drivers/common/inet_drv.c @@ -4089,6 +4089,7 @@ static char* buf_to_sockaddr(char* ptr, char* end, struct sockaddr* addr) addr->sa_family = AF_INET; return ptr + sizeof(struct in_addr); } +#if defined(HAVE_IN6) && defined(AF_INET6) case INET_AF_INET6: { struct in6_addr *p = &((struct sockaddr_in6*)addr)->sin6_addr; buf_check(ptr,end,sizeof(struct in6_addr)); @@ -4096,6 +4097,7 @@ static char* buf_to_sockaddr(char* ptr, char* end, struct sockaddr* addr) addr->sa_family = AF_INET6; return ptr + sizeof(struct in6_addr); } +#endif } error: return NULL; |