This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] [PATCH] ioemu: config cleanup re AF_UNIX sockets on non-Wind

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] ioemu: config cleanup re AF_UNIX sockets on non-Windows
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Wed, 6 Feb 2008 17:26:08 +0000
Delivery-date: Wed, 06 Feb 2008 09:28:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This patch was submitted upstream to qemu but has not yet been
accepted or rejected there.  This change ought probably to be made to
xen-unstable now to help support stub domains.

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.

Note that the change I submit below does _not_ engage this change for

The patch should be applied with
 cd tools/ioemu/
 patch -p0 <.../qemu-allow-no-unix-sockets.patch


Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

Index: qemu_socket.h
RCS file: /sources/qemu/qemu/qemu_socket.h,v
retrieving revision 1.3
diff -u -r1.3 qemu_socket.h
--- qemu_socket.h       17 Dec 2007 04:42:28 -0000      1.3
+++ qemu_socket.h       25 Jan 2008 14:40:19 -0000
@@ -14,12 +14,19 @@
 #define EINTR       WSAEINTR
+#define NO_UNIX_SOCKETS 1
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 #include <sys/un.h>
 #define socket_error() errno
 #define closesocket(s) close(s)
Index: vl.c
RCS file: /sources/qemu/qemu/vl.c,v
retrieving revision 1.401
diff -u -r1.401 vl.c
--- vl.c        23 Jan 2008 19:01:12 -0000      1.401
+++ vl.c        25 Jan 2008 14:40:23 -0000
@@ -3600,7 +3600,7 @@
     return 0;
-#ifndef _WIN32
 static int parse_unix_path(struct sockaddr_un *uaddr, const char *str)
     const char *p;
Index: vnc.c
RCS file: /sources/qemu/qemu/vnc.c,v
retrieving revision 1.33
diff -u -r1.33 vnc.c
--- vnc.c       14 Jan 2008 21:45:55 -0000      1.33
+++ vnc.c       25 Jan 2008 14:40:24 -0000
@@ -2179,7 +2179,7 @@
-#ifndef _WIN32
     if (strstart(display, "unix:", &p)) {
        addr = (struct sockaddr *)&uaddr;
        addrlen = sizeof(uaddr);
Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] ioemu: config cleanup re AF_UNIX sockets on non-Windows, Ian Jackson <=