From: Robert Riebisch <rr@bttr-software.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] QEMU SVN on Windows 2000 :-(
Date: Mon, 02 Feb 2009 22:53:16 +0100 [thread overview]
Message-ID: <49876B4C.9090806@bttr-software.de> (raw)
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/
next reply other threads:[~2009-02-02 21:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-02 21:53 Robert Riebisch [this message]
2009-02-02 22:29 ` [Qemu-devel] QEMU SVN on Windows 2000 :-( 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49876B4C.9090806@bttr-software.de \
--to=rr@bttr-software.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).