You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Rebase against 4a6a7655e1cbc614f609ea53939e240f4f785a94
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From a6a51cbacb0ebe2f387b04824ece1048611becc2 Mon Sep 17 00:00:00 2001
|
||||
From 852993baf2f57a99f9646f946d0921449be43c82 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= <nerv@dawncrow.de>
|
||||
Date: Tue, 26 Aug 2014 00:59:37 +0200
|
||||
Subject: wpcap: Load libpcap dynamically.
|
||||
Subject: [PATCH] wpcap: Load libpcap dynamically.
|
||||
|
||||
This is intended for packagers, without this patch libpcap easily becomes a fixed dependency of wine.
|
||||
Something we don't want i guess.
|
||||
@@ -12,10 +12,10 @@ Something we don't want i guess.
|
||||
3 files changed, 139 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1e6bba3..f0a3b55 100644
|
||||
index be946d542eb..9c59bb5a070 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1174,9 +1174,9 @@ WINE_NOTICE_WITH(opencl,[test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes],
|
||||
@@ -1292,9 +1292,9 @@ WINE_NOTICE_WITH(opencl,[test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes],
|
||||
dnl **** Check for libpcap ****
|
||||
if test "$ac_cv_header_pcap_pcap_h" = "yes"
|
||||
then
|
||||
@@ -39,7 +39,7 @@ index 91b4a955911..aeef71a46e5 100644
|
||||
C_SRCS = \
|
||||
wpcap.c
|
||||
diff --git a/dlls/wpcap/wpcap.c b/dlls/wpcap/wpcap.c
|
||||
index d731d8494f2..94d5479305c 100644
|
||||
index e7908cd038a..a88c325189e 100644
|
||||
--- a/dlls/wpcap/wpcap.c
|
||||
+++ b/dlls/wpcap/wpcap.c
|
||||
@@ -18,6 +18,9 @@
|
||||
@@ -52,9 +52,9 @@ index d731d8494f2..94d5479305c 100644
|
||||
#include <pcap/pcap.h>
|
||||
|
||||
/* pcap.h might define those: */
|
||||
@@ -45,47 +48,128 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
||||
#define PCAP_SRC_IFLOCAL 3
|
||||
#endif
|
||||
@@ -62,47 +65,128 @@ static inline WCHAR *heap_strdupAtoW(const char *str)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static void (*ppcap_breakloop)(pcap_t *);
|
||||
+static void (*ppcap_close)(pcap_t *);
|
||||
@@ -188,7 +188,7 @@ index d731d8494f2..94d5479305c 100644
|
||||
}
|
||||
|
||||
typedef struct
|
||||
@@ -114,10 +198,10 @@ int CDECL wine_pcap_dispatch(pcap_t *p, int cnt,
|
||||
@@ -131,10 +215,10 @@ int CDECL wine_pcap_dispatch(pcap_t *p, int cnt,
|
||||
PCAP_HANDLER_CALLBACK pcb;
|
||||
pcb.pfn_cb = callback;
|
||||
pcb.user_data = user;
|
||||
@@ -201,7 +201,7 @@ index d731d8494f2..94d5479305c 100644
|
||||
}
|
||||
|
||||
int CDECL wine_pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
|
||||
@@ -125,7 +209,7 @@ int CDECL wine_pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
|
||||
@@ -142,7 +226,7 @@ int CDECL wine_pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
|
||||
int ret;
|
||||
|
||||
TRACE("(%p %p)\n", alldevsp, errbuf);
|
||||
@@ -210,7 +210,7 @@ index d731d8494f2..94d5479305c 100644
|
||||
if(alldevsp && !*alldevsp)
|
||||
ERR_(winediag)("Failed to access raw network (pcap), this requires special permissions.\n");
|
||||
|
||||
@@ -141,13 +225,13 @@ int CDECL wine_pcap_findalldevs_ex(char *source, void *auth, pcap_if_t **alldevs
|
||||
@@ -158,13 +242,13 @@ int CDECL wine_pcap_findalldevs_ex(char *source, void *auth, pcap_if_t **alldevs
|
||||
void CDECL wine_pcap_freealldevs(pcap_if_t *alldevs)
|
||||
{
|
||||
TRACE("(%p)\n", alldevs);
|
||||
@@ -226,7 +226,7 @@ index d731d8494f2..94d5479305c 100644
|
||||
}
|
||||
|
||||
typedef struct _AirpcapHandle *PAirpcapHandle;
|
||||
@@ -160,18 +244,18 @@ PAirpcapHandle CDECL wine_pcap_get_airpcap_handle(pcap_t *p)
|
||||
@@ -177,18 +261,18 @@ PAirpcapHandle CDECL wine_pcap_get_airpcap_handle(pcap_t *p)
|
||||
char* CDECL wine_pcap_geterr(pcap_t *p)
|
||||
{
|
||||
TRACE("(%p)\n", p);
|
||||
@@ -248,7 +248,7 @@ index d731d8494f2..94d5479305c 100644
|
||||
TRACE("%s\n", debugstr_a(ret));
|
||||
return ret;
|
||||
}
|
||||
@@ -179,20 +263,20 @@ const char* CDECL wine_pcap_lib_version(void)
|
||||
@@ -196,20 +280,20 @@ const char* CDECL wine_pcap_lib_version(void)
|
||||
int CDECL wine_pcap_list_datalinks(pcap_t *p, int **dlt_buffer)
|
||||
{
|
||||
TRACE("(%p %p)\n", p, dlt_buffer);
|
||||
@@ -272,7 +272,7 @@ index d731d8494f2..94d5479305c 100644
|
||||
}
|
||||
|
||||
int CDECL wine_pcap_loop(pcap_t *p, int cnt,
|
||||
@@ -206,34 +290,34 @@ int CDECL wine_pcap_loop(pcap_t *p, int cnt,
|
||||
@@ -223,34 +307,34 @@ int CDECL wine_pcap_loop(pcap_t *p, int cnt,
|
||||
PCAP_HANDLER_CALLBACK pcb;
|
||||
pcb.pfn_cb = callback;
|
||||
pcb.user_data = user;
|
||||
@@ -313,7 +313,7 @@ index d731d8494f2..94d5479305c 100644
|
||||
}
|
||||
|
||||
#define PCAP_OPENFLAG_PROMISCUOUS 1
|
||||
@@ -244,14 +328,14 @@ pcap_t* CDECL wine_pcap_open(const char *source, int snaplen, int flags, int rea
|
||||
@@ -261,14 +345,14 @@ pcap_t* CDECL wine_pcap_open(const char *source, int snaplen, int flags, int rea
|
||||
int promisc = flags & PCAP_OPENFLAG_PROMISCUOUS;
|
||||
FIXME("(%s %i %i %i %p %p): partial stub\n", debugstr_a(source), snaplen, flags, read_timeout,
|
||||
auth, errbuf);
|
||||
@@ -330,7 +330,7 @@ index d731d8494f2..94d5479305c 100644
|
||||
}
|
||||
|
||||
int CDECL wine_pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf)
|
||||
@@ -295,13 +379,13 @@ int CDECL wine_pcap_parsesrcstr(const char *source, int *type, char *host, char
|
||||
@@ -312,13 +396,13 @@ int CDECL wine_pcap_parsesrcstr(const char *source, int *type, char *host, char
|
||||
int CDECL wine_pcap_sendpacket(pcap_t *p, const unsigned char *buf, int size)
|
||||
{
|
||||
TRACE("(%p %p %i)\n", p, buf, size);
|
||||
@@ -346,7 +346,7 @@ index d731d8494f2..94d5479305c 100644
|
||||
}
|
||||
|
||||
int CDECL wine_pcap_setbuff(pcap_t * p, int dim)
|
||||
@@ -313,25 +397,25 @@ int CDECL wine_pcap_setbuff(pcap_t * p, int dim)
|
||||
@@ -330,25 +414,25 @@ int CDECL wine_pcap_setbuff(pcap_t * p, int dim)
|
||||
int CDECL wine_pcap_setfilter(pcap_t *p, struct bpf_program *fp)
|
||||
{
|
||||
TRACE("(%p %p)\n", p, fp);
|
||||
@@ -376,16 +376,19 @@ index d731d8494f2..94d5479305c 100644
|
||||
}
|
||||
|
||||
int CDECL wine_wsockinit(void)
|
||||
@@ -344,10 +428,29 @@ int CDECL wine_wsockinit(void)
|
||||
@@ -374,7 +458,7 @@ pcap_dumper_t* CDECL wine_pcap_dump_open(pcap_t *p, const char *fname)
|
||||
|
||||
pcap_dumper_t* CDECL wine_pcap_dump_open(pcap_t *p, const char *fname)
|
||||
{
|
||||
- return pcap_dump_open(p, fname);
|
||||
+ return ppcap_dump_open(p, fname);
|
||||
}
|
||||
TRACE("unix_path %s\n", debugstr_a(unix_path));
|
||||
|
||||
- dumper = pcap_dump_open(p, unix_path);
|
||||
+ dumper = ppcap_dump_open(p, unix_path);
|
||||
heap_free(unix_path);
|
||||
|
||||
return dumper;
|
||||
@@ -383,5 +467,24 @@ pcap_dumper_t* CDECL wine_pcap_dump_open(pcap_t *p, const char *fname)
|
||||
void CDECL wine_pcap_dump(u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
|
||||
{
|
||||
TRACE("(%p %p %p)\n", user, h, sp);
|
||||
- return pcap_dump(user, h, sp);
|
||||
+ return ppcap_dump(user, h, sp);
|
||||
+}
|
||||
@@ -409,5 +412,5 @@ index d731d8494f2..94d5479305c 100644
|
||||
+ return TRUE;
|
||||
}
|
||||
--
|
||||
2.13.1
|
||||
2.16.3
|
||||
|
||||
|
@@ -1 +0,0 @@
|
||||
Depends: wpcap-Several_Fixes
|
||||
|
Reference in New Issue
Block a user