qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] QEMU SVN on Windows 2000 :-(
@ 2009-02-02 21:53 Robert Riebisch
  2009-02-02 22:29 ` Anthony Liguori
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Riebisch @ 2009-02-02 21:53 UTC (permalink / raw)
  To: qemu-devel

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'.

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 <rr@bttr-software.de>

Robert Riebisch
-- 
BTTR Software
http://www.bttr-software.de/

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-02-12 13:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-02 21:53 [Qemu-devel] QEMU SVN on Windows 2000 :-( Robert Riebisch
2009-02-02 22:29 ` Anthony Liguori
2009-02-03  7:53   ` Avi Kivity
2009-02-03 12:31     ` Anthony Liguori
2009-02-03 13:28       ` Daniel P. Berrange
2009-02-03 14:59         ` Anthony Liguori
2009-02-03 16:36           ` David Turner
2009-02-03 21:27             ` Robert Riebisch
2009-02-12 13:57               ` David Turner
2009-02-04 12:28         ` Jamie Lokier
2009-02-04 15:21           ` Robert Reif
2009-02-04 15:40             ` David Coppa
2009-02-04 15:58               ` Paul Brook
2009-02-04 20:11             ` Jamie Lokier
2009-02-04 21:00             ` Luca Tettamanti
2009-02-03 13:59       ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).