aboutsummaryrefslogtreecommitdiff
path: root/oslib-win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'oslib-win32.c')
-rw-r--r--oslib-win32.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/oslib-win32.c b/oslib-win32.c
index 3b5245d127..1ddd857942 100644
--- a/oslib-win32.c
+++ b/oslib-win32.c
@@ -29,6 +29,7 @@
#include "config-host.h"
#include "sysemu.h"
#include "trace.h"
+#include "qemu_socket.h"
static void *oom_check(void *ptr)
{
@@ -71,3 +72,23 @@ void qemu_vfree(void *ptr)
trace_qemu_vfree(ptr);
VirtualFree(ptr, 0, MEM_RELEASE);
}
+
+void socket_set_nonblock(int fd)
+{
+ unsigned long opt = 1;
+ ioctlsocket(fd, FIONBIO, &opt);
+}
+
+int inet_aton(const char *cp, struct in_addr *ia)
+{
+ uint32_t addr = inet_addr(cp);
+ if (addr == 0xffffffff) {
+ return 0;
+ }
+ ia->s_addr = addr;
+ return 1;
+}
+
+void qemu_set_cloexec(int fd)
+{
+}