diff --git a/doc/Changelog b/doc/Changelog index 7faf7a2fe..55d1c0852 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +6 June 2017: Wouter + - Add an explicit type cast for TCP FASTOPEN fix. + 1 June 2017: Ralph - Fix #1274: automatically trim chroot path from dnscrypt key/cert paths (from Manu Bretelle). diff --git a/util/netevent.c b/util/netevent.c index d3955aae7..6990cdb36 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -1417,7 +1417,7 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) /* fallthrough to nonFASTOPEN * (MSG_FASTOPEN on Linux 3 produces EPIPE) * we need to perform connect() */ - if(connect(fd, &c->repinfo.addr, c->repinfo.addrlen) == -1) { + if(connect(fd, (struct sockaddr *)&c->repinfo.addr, c->repinfo.addrlen) == -1) { #ifdef EINPROGRESS if(errno == EINPROGRESS) return 1; /* wait until connect done*/ @@ -1428,7 +1428,7 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) return 1; /* wait until connect done*/ #endif if(tcp_connect_errno_needs_log( - &c->repinfo.addr, c->repinfo.addrlen)) { + (struct sockaddr *)&c->repinfo.addr, c->repinfo.addrlen)) { log_err_addr("outgoing tcp: connect after EPIPE for fastopen", strerror(errno), &c->repinfo.addr, c->repinfo.addrlen); }