Last active
August 8, 2017 23:14
-
-
Save grigorye/578d593c3f9412c8543879fbb26a7304 to your computer and use it in GitHub Desktop.
Patch for minidlna (1.1.15 or later) that otherwise fails with "minissdp.c:261: error: sendto(udp): Can't assign requested address" on MacOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- minidlna-1.1.5/minissdp.c~orig 2015-09-10 21:24:09.000000000 +0200 | |
+++ minidlna-1.1.5/minissdp.c 2017-08-09 01:03:45.000000000 +0200 | |
@@ -113,11 +113,16 @@ | |
memset(&sockname, 0, sizeof(struct sockaddr_in)); | |
sockname.sin_family = AF_INET; | |
sockname.sin_port = htons(SSDP_PORT); | |
+#if 0 | |
/* NOTE: Binding a socket to a UDP multicast address means, that we just want | |
* to receive datagramms send to this multicast address. | |
* To specify the local nics we want to use we have to use setsockopt, | |
* see AddMulticastMembership(...). */ | |
sockname.sin_addr.s_addr = inet_addr(SSDP_MCAST_ADDR); | |
+#else | |
+ /* NOTE : it seems it doesnt work when binding on the specific address */ | |
+ sockname.sin_addr.s_addr = htonl(INADDR_ANY); | |
+#endif | |
if (bind(s, (struct sockaddr *)&sockname, sizeof(struct sockaddr_in)) < 0) | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment