Module: wine Branch: master Commit: b2962fb87ee3faf983537984b3d2ee8988da8f82 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b2962fb87ee3faf983537984b3...
Author: André Hentschel nerv@dawncrow.de Date: Tue Aug 19 00:02:22 2014 +0200
wpcap: Implement wsockinit.
---
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 <pcap/pcap.h> +#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