jsproxy: Build with Windows sockets.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-06-06 09:21:25 +02:00
parent 29ea8b42db
commit 5831a0bfea
2 changed files with 2 additions and 24 deletions

View File

@ -1,5 +1,5 @@
MODULE = jsproxy.dll
IMPORTS = uuid oleaut32 ole32
IMPORTS = uuid oleaut32 ole32 ws2_32
IMPORTLIB = jsproxy
C_SRCS = \

View File

@ -21,29 +21,12 @@
#include <stdarg.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif
#if defined(__MINGW32__) || defined (_MSC_VER)
# include <ws2tcpip.h>
#else
# define closesocket close
# define ioctlsocket ioctl
#endif
#include "windef.h"
#include "winbase.h"
#ifndef __MINGW32__
#define USE_WS_PREFIX
#endif
#include "winsock2.h"
#include "ws2ipdef.h"
#include "ws2tcpip.h"
#include "winnls.h"
#include "wininet.h"
#define COBJMACROS
@ -327,7 +310,6 @@ static void printf_addr( const WCHAR *fmt, WCHAR *buf, struct sockaddr_in *addr
static HRESULT dns_resolve( const WCHAR *hostname, VARIANT *result )
{
#ifdef HAVE_GETADDRINFO
static const WCHAR fmtW[] = {'%','u','.','%','u','.','%','u','.','%','u',0};
WCHAR addr[16];
struct addrinfo *ai, *elem;
@ -356,10 +338,6 @@ static HRESULT dns_resolve( const WCHAR *hostname, VARIANT *result )
V_VT( result ) = VT_BSTR;
V_BSTR( result ) = SysAllocString( addr );
return S_OK;
#else
FIXME("getaddrinfo not found at build time\n");
return S_FALSE;
#endif
}
static HRESULT WINAPI dispex_InvokeEx(