From: André Hentschel Subject: [14/14] wpcap: Implement wsockinit Message-Id: <53F277EE.7010102@dawncrow.de> Date: Tue, 19 Aug 2014 00:02:22 +0200 --- dlls/wpcap/Makefile.in | 1 + dlls/wpcap/wpcap.c | 9 +++++++++ dlls/wpcap/wpcap.spec | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dlls/wpcap/Makefile.in b/dlls/wpcap/Makefile.in index 70a0fec..5caffbc 100644 --- a/dlls/wpcap/Makefile.in +++ b/dlls/wpcap/Makefile.in @@ -1,4 +1,5 @@ MODULE = wpcap.dll +DELAYIMPORTS = ws2_32 EXTRALIBS = @LIBPCAP@ C_SRCS = \ diff --git a/dlls/wpcap/wpcap.c b/dlls/wpcap/wpcap.c index 16b92f4..90b0647a 100644 --- a/dlls/wpcap/wpcap.c +++ b/dlls/wpcap/wpcap.c @@ -19,6 +19,7 @@ */ #include +#include "winsock2.h" #include "windef.h" #include "winbase.h" #include "wine/debug.h" @@ -273,3 +274,11 @@ int CDECL wine_pcap_stats(pcap_t *p, struct pcap_stat *ps) TRACE("(%p %p)\n", p, ps); return pcap_stats(p, ps); } + +int CDECL wine_wsockinit(void) +{ + WSADATA wsadata; + TRACE("()\n"); + if (WSAStartup(MAKEWORD(1,1), &wsadata)) return -1; + return 0; +} diff --git a/dlls/wpcap/wpcap.spec b/dlls/wpcap/wpcap.spec index 33cc9ef..540089d 100644 --- a/dlls/wpcap/wpcap.spec +++ b/dlls/wpcap/wpcap.spec @@ -75,4 +75,4 @@ @ cdecl pcap_stats(ptr ptr) wine_pcap_stats @ stub pcap_stats_ex @ stub pcap_strerror -@ stub wsockinit +@ cdecl wsockinit() wine_wsockinit