Allow compilation on OSes without IPv6 support

This commit is contained in:
Cameron Gutman
2021-04-17 23:40:36 -05:00
parent bced126fdb
commit 3979dbd082
6 changed files with 37 additions and 14 deletions

View File

@@ -151,7 +151,7 @@ unsigned int LiTestClientConnectivity(const char* testServer, unsigned short ref
goto Exit;
}
((struct sockaddr_in6*)&address)->sin6_port = htons(LiGetPortFromPortFlagIndex(i));
SET_PORT((LC_SOCKADDR*)&address, LiGetPortFromPortFlagIndex(i));
if (LiGetProtocolFromPortFlagIndex(i) == IPPROTO_TCP) {
// Initiate an asynchronous connection
err = connect(sockets[i], (struct sockaddr*)&address, address_length);