Use GetBestInterface() instead of GetBestInterfaceEx()
GetBestInterfaceEx() is not supported by older i586-mingw32msvc-gcc compiler. GetBestInterface() works only with IPv4 addresses but in this case it is enough as it is needed only for IP address 223.255.255.255.
This commit is contained in:
parent
23f492fd1b
commit
26e8f7831a
|
@ -570,12 +570,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
|
|||
* in order to give this ip to setsockopt(sudp, IPPROTO_IP, IP_MULTICAST_IF) */
|
||||
if(!ipv6) {
|
||||
DWORD ifbestidx;
|
||||
SOCKADDR_IN destAddr;
|
||||
memset(&destAddr, 0, sizeof(destAddr));
|
||||
destAddr.sin_family = AF_INET;
|
||||
destAddr.sin_addr.s_addr = inet_addr("223.255.255.255");
|
||||
destAddr.sin_port = 0;
|
||||
if (GetBestInterfaceEx((struct sockaddr *)&destAddr, &ifbestidx) == NO_ERROR) {
|
||||
if (GetBestInterface(inet_addr("223.255.255.255"), &ifbestidx) == NO_ERROR) {
|
||||
DWORD dwRetVal = NO_ERROR;
|
||||
PIP_ADAPTER_ADDRESSES pAddresses = NULL;
|
||||
ULONG outBufLen = 15360;
|
||||
|
|
Loading…
Reference in New Issue