diff options
-rw-r--r-- | tools/ioemu/qemu_socket.h | 7 | ||||
-rw-r--r-- | tools/ioemu/vl.c | 2 | ||||
-rw-r--r-- | tools/ioemu/vnc.c | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/tools/ioemu/qemu_socket.h b/tools/ioemu/qemu_socket.h index 6e8bcce6cf..d462d08d60 100644 --- a/tools/ioemu/qemu_socket.h +++ b/tools/ioemu/qemu_socket.h @@ -14,12 +14,19 @@ #define EINTR WSAEINTR #define EINPROGRESS WSAEINPROGRESS +#ifndef NO_UNIX_SOCKETS +#define NO_UNIX_SOCKETS 1 +#endif + #else #include <sys/socket.h> #include <netinet/in.h> #include <netinet/tcp.h> + +#ifndef NO_UNIX_SOCKETS #include <sys/un.h> +#endif #define socket_error() errno #define closesocket(s) close(s) diff --git a/tools/ioemu/vl.c b/tools/ioemu/vl.c index 939149c46f..cb94bada09 100644 --- a/tools/ioemu/vl.c +++ b/tools/ioemu/vl.c @@ -3127,7 +3127,7 @@ int parse_host_port(struct sockaddr_in *saddr, const char *str) return 0; } -#ifndef _WIN32 +#ifndef NO_UNIX_SOCKETS static int parse_unix_path(struct sockaddr_un *uaddr, const char *str) { const char *p; diff --git a/tools/ioemu/vnc.c b/tools/ioemu/vnc.c index 11cd94479f..0dd78dd4b4 100644 --- a/tools/ioemu/vnc.c +++ b/tools/ioemu/vnc.c @@ -2401,7 +2401,7 @@ int vnc_display_open(DisplayState *ds, const char *display, int find_unused) } #endif } -#ifndef _WIN32 +#ifndef NO_UNIX_SOCKETS if (strstart(display, "unix:", &p)) { addr = (struct sockaddr *)&uaddr; addrlen = sizeof(uaddr); |