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). + */ + + size_t skipping = 0; + struct iovec *start = async->iov + async->iov_cursor; + + for(ssize_t i = async->iov_cursor; i < async->count; i++)
Some compilers can't handle the variable declaration here; you'll need to move it outside the loop. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2100#note_23780