X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Fbsd-security.c;fp=common-src%2Fbsd-security.c;h=4be79482bb6bc036871bcc539bab6b8c6d133dd2;hb=fb2bd066c2f8b34addafe48d62550e3033a59431;hp=8953f1f9308e72bf3a951bda549a45258cef2f46;hpb=a6127998ee6dcab6bb034f6ca985b07804a86f9a;p=debian%2Famanda diff --git a/common-src/bsd-security.c b/common-src/bsd-security.c index 8953f1f..4be7948 100644 --- a/common-src/bsd-security.c +++ b/common-src/bsd-security.c @@ -37,6 +37,7 @@ #include "packet.h" #include "security.h" #include "security-util.h" +#include "sockaddr-util.h" #include "stream.h" #include "version.h" @@ -277,7 +278,7 @@ bsd_connect( handle=alloc(15); g_snprintf(handle, 14, "000-%08x", (unsigned)newhandle++); if (udp_inithandle(bh->udp, bh, canonname, - (struct sockaddr_storage *)res_addr->ai_addr, port, handle, sequence) < 0) { + (sockaddr_union *)res_addr->ai_addr, port, handle, sequence) < 0) { (*fn)(arg, &bh->sech, S_ERROR); amfree(bh->hostname); amfree(bh); @@ -387,7 +388,7 @@ bsd_stream_server( bs = alloc(SIZEOF(*bs)); security_streaminit(&bs->secstr, &bsd_security_driver); - bs->socket = stream_server(bh->udp->peer.ss_family, &bs->port, + bs->socket = stream_server(SU_GET_FAMILY(&bh->udp->peer), &bs->port, (size_t)STREAM_BUFSIZE, (size_t)STREAM_BUFSIZE, 0); if (bs->socket < 0) {