mirror of
https://github.com/status-im/miniupnp.git
synced 2025-02-07 11:54:35 +00:00
Fixed incompatible types (from 'int *' to 'const char *') warning #2
https://msdn.microsoft.com/en-us/library/windows/desktop/ms738574(v=vs.85).aspx
This commit is contained in:
parent
f7ec37d92f
commit
1ffb2ea580
@ -615,8 +615,13 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(ipv6) {
|
if(ipv6) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
DWORD mcastHops = ttl;
|
||||||
|
if(setsockopt(sudp, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, (const char *)&mcastHops, sizeof(mcastHops)) < 0)
|
||||||
|
#else /* _WIN32 */
|
||||||
int mcastHops = ttl;
|
int mcastHops = ttl;
|
||||||
if(setsockopt(sudp, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &mcastHops, sizeof(mcastHops)) < 0)
|
if(setsockopt(sudp, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &mcastHops, sizeof(mcastHops)) < 0)
|
||||||
|
#endif /* _WIN32 */
|
||||||
{
|
{
|
||||||
PRINT_SOCKET_ERROR("setsockopt(IPV6_MULTICAST_HOPS,...)");
|
PRINT_SOCKET_ERROR("setsockopt(IPV6_MULTICAST_HOPS,...)");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user