http://bugs.winehq.org/show_bug.cgi?id=8513
--- Comment #13 from rasz citizenr@gmail.com 2007-11-06 12:20:21 ---
The initial problem is not fixable on a BSD socket platform.
umm, the problem is not in "BSD socket platform"/linux tcpip stack, the problem is in Wine lacking this functionality. Wine is already a middleman between apps and the kernel sockets, so what is stopping it from lying a little?
How does it work under windows? Does it hijack the port unbinding it from the previous owner (and returns error)? or does the previous owner just stop receiving data until the new SO_REUSEADDR socket is released? What if a third app also uses SO_REUSEADDR and again takes port rom the previous one that used SO_REUSEADDR? :)
I know that implementing it would look like a hack, but i suspect that its already a hack under windows from early tcpip implementation, and there are many applications using this flag (with your fix some of them will just fail to bind port since windows has no problem with this flag).