From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LU7IL-0003Dq-1K for qemu-devel@nongnu.org; Mon, 02 Feb 2009 17:29:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LU7IK-0003DO-HD for qemu-devel@nongnu.org; Mon, 02 Feb 2009 17:29:32 -0500 Received: from [199.232.76.173] (port=38494 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU7IK-0003DG-Dw for qemu-devel@nongnu.org; Mon, 02 Feb 2009 17:29:32 -0500 Received: from mail-qy0-f20.google.com ([209.85.221.20]:57805) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LU7IK-0006TN-4j for qemu-devel@nongnu.org; Mon, 02 Feb 2009 17:29:32 -0500 Received: by qyk13 with SMTP id 13so3425214qyk.10 for ; Mon, 02 Feb 2009 14:29:29 -0800 (PST) Message-ID: <498773B6.7060301@codemonkey.ws> Date: Mon, 02 Feb 2009 16:29:10 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] QEMU SVN on Windows 2000 :-( References: <49876B4C.9090806@bttr-software.de> In-Reply-To: <49876B4C.9090806@bttr-software.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 : > *** > *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 > + > #ifndef AI_ADDRCONFIG > # define AI_ADDRCONFIG 0 > #endif > *** > > Signed-off-by: Robert Riebisch > > Robert Riebisch >