qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] QEMU SVN on Windows 2000 :-(


From: Anthony Liguori
Subject: Re: [Qemu-devel] QEMU SVN on Windows 2000 :-(
Date: Mon, 02 Feb 2009 16:29:10 -0600
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Robert Riebisch wrote:
Hi!

Unfortunately Win32 binaries built from QEMU SVN don't run on Windows
2000 anymore, because of missing DLL entry points in `ws2_32.dll'.

Unfortunately, win2k is so old at this point, that I don't know that it's worth jumping through hoops to support.

If someone can come up with a simple patch (with appropriately licensed code), then I'd be happy to apply it. Otherwise, I don't think not supporting win2k as a host is a huge loss.

Regards,

Anthony Liguori

With the introduction of IPv6 QEMU relies on the presence of
getaddrinfo(), getnameinfo(), and freeaddrinfo(). This is OK for Windows
XP or later, but not for Windows 2000.

From <http://msdn.microsoft.com/en-us/library/ms738520(VS.85).aspx>:
***
*Support for getaddrinfo on older versions of Windows*

The getaddrinfo function was added to the Ws2_32.dll on Windows XP and
later. To execute an application that uses this function on earlier
versions of Windows, then you need to include the Ws2tcpip.h and
Wspiapi.h files. When the Wspiapi.h include file is added, the
getaddrinfo function is defined to the WspiapiGetAddrInfo inline
function in the Wspiapi.h file. At runtime, the WspiapiGetAddrInfo
function is implemented in such a way that if the Ws2_32.dll or the
Wship6.dll (the file containing getaddrinfo in the IPv6 Technology
Preview for Windows 2000) does not include getaddrinfo, then a version
of getaddrinfo is implemented inline based on code in the Wspiapi.h
header file. This inline code will be used on older Windows platforms
that do not natively support the getaddrinfo function.

The IPv6 protocol is supported on Windows 2000 when the IPv6 Technology
Preview for Windows 2000 is installed. Otherwise getaddrinfo support on
versions of Windows earlier than Windows XP is limited to handling IPv4
name resolution.
***

This stupid little patch works for me, but it requires copyrighted file
`Wspiapi.h' from MSVC2005, because MinGW doesn't provide such a file.
I've tested this on Windows 2000 only with IPv4. Better solutions are
highly appreciated.

***
--- qemu-sockets.c.orig Wed Jan 14 19:34:22 2009
+++ qemu-sockets.c      Mon Feb 02 22:04:42 2009
@@ -22,6 +22,9 @@
 #include "qemu_socket.h"
 #include "qemu-common.h" /* for qemu_isdigit */

+#define _inline __inline /* circumvent header file issue */
+#include <wspiapi.h>
+
 #ifndef AI_ADDRCONFIG
 # define AI_ADDRCONFIG 0
 #endif
***

Signed-off-by: Robert Riebisch <address@hidden>

Robert Riebisch





reply via email to

[Prev in Thread] Current Thread [Next in Thread]