Is there a reason to retry on EACCES, instead of just always setting SO_BROADCAST before calling connect()?
Well, I didn't check thoroughly if it is going to break anything under presumption that it might and it is cleaner to avoid such tweaks on the default path. Also, it is an extra syscall in wineserver otherwise unneeded on the common path (and avoided in the current version of the patch), I'd expect the case when it will actually trigger to be very rare.