http://bugs.winehq.org/show_bug.cgi?id=31994
--- Comment #14 from Starous starous@volny.cz 2012-10-23 08:55:56 CDT --- (In reply to comment #13)
I'm pretty sure this was discussed before but I could not find it. You could try forcing SO_BROADCAST in the socket. Do something like this inside WS2_sendto after "if ( fd == -1 ) return SOCKET_ERROR;"
n=1; setsockopt(fd,SOL_SOCKET,SO_BROADCAST,&n,sizeof(n));
I'm away from linux so I can't create a diff, sorry.
Hi, I tried to do it in this way: { n = WS2_send( fd, wsa );
+ if (n == -1 && errno == EACCES) + { + n = 1; + setsockopt(fd,SOL_SOCKET,SO_BROADCAST,&n,sizeof(n)); + n = WS2_send( fd, wsa ); + } + if (n != -1 || errno != EINTR) break; } if (n == -1 && errno != EAGAIN)
and it works! THX!