X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=tests%2Fclient.c;h=23dca4b3c580dbac340c42be38f4b0d18118b19d;hb=e83df110da120749285426797455444da6e6cf95;hp=028189a24d44843c932955c5bcf0b6a6addc5975;hpb=23787d573fd2e4f31c1205f17c5d90fd5516a3fc;p=tlsproxy%2Ftlsproxy.git diff --git a/tests/client.c b/tests/client.c index 028189a..23dca4b 100644 --- a/tests/client.c +++ b/tests/client.c @@ -115,7 +115,12 @@ int main (int argc, char *argv[]) { return EXIT_FAILURE; } +#ifdef HAVE_GNUTLS_TRANSPORT_SET_INT2 + /* gnutls_transport_set_int() is a macro. */ + gnutls_transport_set_int(session, server); +#else gnutls_transport_set_ptr(session, (gnutls_transport_ptr_t)server); +#endif result = gnutls_handshake(session); if (result != GNUTLS_E_SUCCESS) { @@ -220,7 +225,7 @@ static int connect_to_host(const char *hostname, const char *port) { gai_hints.ai_protocol = 0; gai_hints.ai_flags = AI_NUMERICSERV /* given port is numeric */ | AI_ADDRCONFIG /* supported by this computer */ - | AI_V4MAPPED; /* support IPv4 through IPv6 */ + ; gai_return = getaddrinfo(hostname, port, &gai_hints, &gai_result); if (gai_return != 0) { if (gai_return == EAI_SYSTEM) {