Zebediah Figura (@zfigura) commented about dlls/ntdll/unix/socket.c:
{ ULONG_PTR information;
status = try_send( fd, async );
if (protocol == IPPROTO_UDP && async->addr && sockaddr_get_port(async->addr, async->addr_len) == 0 )
{
/* Some Windows applications(Spellforce 3 is known to) send to port 0.
* This causes 'sendmsg' to throw a EINVAL error, on Windows this does nothing but consume the data.
* This workaround says we successfully sent data even though we didn't send anything.
* Matching the Windows behaviour, making the program work(in theory).
I think you can just delete the last two sentences. I'd also just simplify and say "Spellforce 3 sends data to port 0", no need to generalize that to "some applications".