|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] ioemu: config cleanup re AF_UNIX sockets
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1202375952 0
# Node ID 3821e39cc1a056921c65612154f0946638be25e6
# Parent 0672d5b11262be541f12e74e604f10a04d319cfa
ioemu: config cleanup re AF_UNIX sockets on non-Windows
Here is what I wrote in my submission to qemu upstream:
The patch below makes it possible to disable AF_UNIX (unix-domain)
sockets in host environments which do not define _WIN32, by adding
-DNO_UNIX_SOCKETS to the compiler flags. This is useful in the
effectively-embedded qemu host which are going to be using for device
emulation in Xen.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
tools/ioemu/qemu_socket.h | 7 +++++++
tools/ioemu/vl.c | 2 +-
tools/ioemu/vnc.c | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff -r 0672d5b11262 -r 3821e39cc1a0 tools/ioemu/qemu_socket.h
--- a/tools/ioemu/qemu_socket.h Thu Feb 07 09:16:20 2008 +0000
+++ b/tools/ioemu/qemu_socket.h Thu Feb 07 09:19:12 2008 +0000
@@ -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 -r 0672d5b11262 -r 3821e39cc1a0 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c Thu Feb 07 09:16:20 2008 +0000
+++ b/tools/ioemu/vl.c Thu Feb 07 09:19:12 2008 +0000
@@ -3127,7 +3127,7 @@ int parse_host_port(struct sockaddr_in *
return 0;
}
-#ifndef _WIN32
+#ifndef NO_UNIX_SOCKETS
static int parse_unix_path(struct sockaddr_un *uaddr, const char *str)
{
const char *p;
diff -r 0672d5b11262 -r 3821e39cc1a0 tools/ioemu/vnc.c
--- a/tools/ioemu/vnc.c Thu Feb 07 09:16:20 2008 +0000
+++ b/tools/ioemu/vnc.c Thu Feb 07 09:19:12 2008 +0000
@@ -2401,7 +2401,7 @@ int vnc_display_open(DisplayState *ds, c
}
#endif
}
-#ifndef _WIN32
+#ifndef NO_UNIX_SOCKETS
if (strstart(display, "unix:", &p)) {
addr = (struct sockaddr *)&uaddr;
addrlen = sizeof(uaddr);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] ioemu: config cleanup re AF_UNIX sockets on non-Windows,
Xen patchbot-unstable <=
|
|
|
|
|