Windows and Linux actually behave the same with respect to using INADDR_ANY . The confusion here is that the two links you provide are used in different contexts.
When using the bind function to bind to an address / port, specifying INADDR_ANY means that the socket will be able to receive packets on this port from any interface. However, it does not configure anything regarding multicast.
In the context of calling IP_ADD_MEMBERSHIP on setsockopt setting the interface to INADDR_ANY will cause the system to join this multicast group over the default network interface.
The Linux link you provided is for bind , and the Windows link is for setsockopt and IP_ADD_MEMBERSHIP .
If you want to join the multicast group on all interfaces, you need to get a list of interfaces in the system and join each of them. On Windows, the GetAdaptersAddresses() function GetAdaptersAddresses() provide you with a list of interfaces. On Linux, use the getifaddrs() function.
Here is an example using the GetAdaptersAddresses() function in C:
struct iflist { char name[50]; struct sockaddr_in sin; int isloopback; int ismulti; int ifidx; }; void getiflist(struct iflist *list, int *len) { IP_ADAPTER_ADDRESSES *head, *curr; IP_ADAPTER_UNICAST_ADDRESS *uni; char *buf; int buflen, err, i; buflen = 100000; buf = calloc(buflen, 1); head = (IP_ADAPTER_ADDRESSES *)buf; if ((err = GetAdaptersAddresses(AF_UNSPEC, 0, NULL, head, &buflen)) != ERROR_SUCCESS) { char errbuf[300]; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, errbuf, sizeof(errbuf), NULL); printf("GetAdaptersAddresses failed: (%d) %s", err, errbuf); free(buf); return; } for (*len = 0, curr = head; curr; curr = curr->Next) { if (curr->IfType == IF_TYPE_TUNNEL) continue; for (uni = curr->FirstUnicastAddress; uni; uni = uni->Next) { if (curr->OperStatus == IfOperStatusUp) { memset(&list[*len], 0, sizeof(struct iflist)); strncpy(list[*len].name, (char *)curr->AdapterName, sizeof(list[i].name) - 1); memcpy(&list[*len].sin, uni->Address.lpSockaddr, uni->Address.iSockaddrLength); list[*len].isloopback = (curr->IfType == IF_TYPE_SOFTWARE_LOOPBACK); list[*len].ismulti = ((curr->Flags & IP_ADAPTER_NO_MULTICAST) == 0); if (uni->Address.lpSockaddr->sa_family == AF_INET6) { list[*len].ifidx = curr->Ipv6IfIndex; } else { list[*len].ifidx = curr->IfIndex; } (*len)++; } } } free(buf); }