Skip to content

Commit d1ba448

Browse files
committed
Small corrections to if_indextoname resolution on win32, compiles clean. Backports: r1855864
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1855865 13f79535-47bb-0310-9956-ffa450edef68
1 parent 20b8acd commit d1ba448

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/arch/win32/apr_arch_misc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_IPHLPAPI, NET_IFINDEX, WINAPI, if_nametoindex, 0,
498498
#undef if_indextoname
499499
#endif
500500
APR_DECLARE_LATE_DLL_FUNC(DLL_IPHLPAPI, PCHAR, NETIOAPI_API_, if_indextoname, 0, (
501-
NET_IFINDEX InterfaceIndex
501+
NET_IFINDEX InterfaceIndex,
502502
PCHAR InterfaceName),
503503
(InterfaceIndex, InterfaceName));
504504
#define if_indextoname apr_winapi_if_indextoname

network_io/unix/sockaddr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#endif
3131

3232
#if defined(HAVE_IF_INDEXTONAME) && defined(_MSC_VER)
33-
#include <Iphlpapi.h>
33+
#include "arch/win32/apr_arch_misc.h"
3434
#endif
3535

3636
#define APR_WANT_STRFUNC
@@ -1252,7 +1252,7 @@ APR_DECLARE(apr_status_t) apr_sockaddr_zone_set(apr_sockaddr_t *sa,
12521252
return APR_EGENERAL;
12531253
}
12541254

1255-
sa->sa.sin6.sin6_scope_id = i;
1255+
sa->sa.sin6.sin6_scope_id = (unsigned int) i;
12561256
return APR_SUCCESS;
12571257
}
12581258
#endif

0 commit comments

Comments
 (0)