From a18fd2b4b51c3a5429ca98d16700cf59e96e4612 Mon Sep 17 00:00:00 2001 From: Andrii Briantsev Date: Sat, 6 Jun 2020 01:57:43 +0200 Subject: [PATCH] This fixes build of the project on Windows --- system/BConnection_win.c | 4 ++-- system/BDatagram_win.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/BConnection_win.c b/system/BConnection_win.c index a5fac7ea7..1241c5be0 100644 --- a/system/BConnection_win.c +++ b/system/BConnection_win.c @@ -796,7 +796,7 @@ int BConnection_GetLocalAddress (BConnection *o, BAddr *local_addr) { DebugObject_Access(&o->d_obj); - struct BDatagram_sys_addr sysaddr; + struct sys_addr sysaddr; socklen_t addr_size = sizeof(sysaddr.addr.generic); if (getsockname(o->sock, &sysaddr.addr.generic, &addr_size) != 0) { BLog(BLOG_ERROR, "BConnection_GetLocalAddress: getsockname failed"); @@ -809,7 +809,7 @@ int BConnection_GetLocalAddress (BConnection *o, BAddr *local_addr) if (addr.type == BADDR_TYPE_NONE) { BLog(BLOG_ERROR, "BConnection_GetLocalAddress: Unsupported address family " - "from getsockname: %d", int(sysaddr.addr.generic.sa_family)); + "from getsockname: %d", sysaddr.addr.generic.sa_family); return 0; } diff --git a/system/BDatagram_win.c b/system/BDatagram_win.c index 3fd637059..cf6d3ffa3 100644 --- a/system/BDatagram_win.c +++ b/system/BDatagram_win.c @@ -652,7 +652,7 @@ int BDatagram_GetLocalAddr (BDatagram *o, BAddr *local_addr) if (addr.type == BADDR_TYPE_NONE) { BLog(BLOG_ERROR, "BDatagram_GetLocalAddr: Unsupported address family " - "from getsockname: %d", int(sysaddr.addr.generic.sa_family)); + "from getsockname: %d", sysaddr.addr.generic.sa_family); return 0; }