https://bugs.winehq.org/show_bug.cgi?id=37669
--- Comment #15 from Dmitry Timoshkov dmitry@baikal.ru --- Created attachment 50161 --> https://bugs.winehq.org/attachment.cgi?id=50161 patch for ws2_32.recv
Here is the patch that I'm using as a workaround, it works for the application I'm interested in. Obviously it's limited to ws2_32.recv and is not a general solution unlike Sebastian's approach.