summaryrefslogtreecommitdiffstats
path: root/util/oslib-win32.c
diff options
context:
space:
mode:
authorAnthony Liguori <anthony@codemonkey.ws>2013-10-09 07:52:21 -0700
committerAnthony Liguori <anthony@codemonkey.ws>2013-10-09 07:52:21 -0700
commit9e8f8b1cd8e1b85dc93c367c4745f9944079a37b (patch)
treea4368aa23843f61829c01eb25a0deebee2262642 /util/oslib-win32.c
parentdfe22799751818115ed6d36bedc8a55b2026de3a (diff)
parent04fd1c789677fe121cb9546c652d088c994477fb (diff)
downloadhqemu-9e8f8b1cd8e1b85dc93c367c4745f9944079a37b.zip
hqemu-9e8f8b1cd8e1b85dc93c367c4745f9944079a37b.tar.gz
Merge remote-tracking branch 'sweil/mingw' into staging
# By Sebastian Ottlik # Via Stefan Weil * sweil/mingw: util: call socket_set_fast_reuse instead of setting SO_REUSEADDR slirp: call socket_set_fast_reuse instead of setting SO_REUSEADDR net: call socket_set_fast_reuse instead of setting SO_REUSEADDR gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR Message-id: 1380735690-24009-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Diffstat (limited to 'util/oslib-win32.c')
-rw-r--r--util/oslib-win32.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/oslib-win32.c b/util/oslib-win32.c
index 983b7a2..776ccfa 100644
--- a/util/oslib-win32.c
+++ b/util/oslib-win32.c
@@ -124,6 +124,16 @@ void qemu_set_nonblock(int fd)
qemu_fd_register(fd);
}
+int socket_set_fast_reuse(int fd)
+{
+ /* Enabling the reuse of an endpoint that was used by a socket still in
+ * TIME_WAIT state is usually performed by setting SO_REUSEADDR. On Windows
+ * fast reuse is the default and SO_REUSEADDR does strange things. So we
+ * don't have to do anything here. More info can be found at:
+ * http://msdn.microsoft.com/en-us/library/windows/desktop/ms740621.aspx */
+ return 0;
+}
+
int inet_aton(const char *cp, struct in_addr *ia)
{
uint32_t addr = inet_addr(cp);
OpenPOWER on IntegriCloud