File a78be8c5756f0b50f11b5270bf8f7d6ef35a7e2a.patch of Package wine

From a78be8c5756f0b50f11b5270bf8f7d6ef35a7e2a Mon Sep 17 00:00:00 2001
From: Hans Leidekker <hans@codeweavers.com>
Date: Wed, 22 Jan 2025 13:41:04 +0100
Subject: [PATCH] wpcap: Fix callback signature.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57711
---
 dlls/wpcap/tests/wpcap.c | 8 ++++----
 dlls/wpcap/wpcap.c       | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/wpcap/tests/wpcap.c b/dlls/wpcap/tests/wpcap.c
index 33a45ef066b1..4977f785a7cb 100644
--- a/dlls/wpcap/tests/wpcap.c
+++ b/dlls/wpcap/tests/wpcap.c
@@ -86,7 +86,7 @@ static int (CDECL *ppcap_datalink_name_to_val)( const char * );
 static const char * (CDECL *ppcap_datalink_val_to_description)( int );
 static const char * (CDECL *ppcap_datalink_val_to_name)( int );
 static int (CDECL *ppcap_dispatch)( pcap_t *, int,
-                                    void (CALLBACK *)(unsigned char *, const struct pcap_pkthdr *, const unsigned char *),
+                                    void (CDECL *)(unsigned char *, const struct pcap_pkthdr *, const unsigned char *),
                                     unsigned char * );
 static pcap_dumper_t * (CDECL *ppcap_dump_open)( pcap_t *, const char * );
 static void (CDECL *ppcap_dump)( unsigned char *, const struct pcap_pkthdr *, const unsigned char * );
@@ -107,7 +107,7 @@ static int (CDECL *ppcap_list_tstamp_types)( pcap_t *, int ** );
 static char * (CDECL *ppcap_lookupdev)( char * );
 static int (CDECL *ppcap_lookupnet)( const char *, unsigned int *, unsigned int *, char * );
 static int (CDECL *ppcap_loop)( pcap_t *, int,
-                                void (CALLBACK *)(unsigned char *, const struct pcap_pkthdr *, const unsigned char *),
+                                void (CDECL *)(unsigned char *, const struct pcap_pkthdr *, const unsigned char *),
                                 unsigned char * );
 static int (CDECL *ppcap_set_buffer_size)( pcap_t *, int );
 static int (CDECL *ppcap_set_datalink)( pcap_t *, int );
@@ -121,7 +121,7 @@ static int CDECL (*ppcap_tstamp_type_name_to_val)( const char * );
 static const char * (CDECL *ppcap_tstamp_type_val_to_description)( int );
 static const char * (CDECL *ppcap_tstamp_type_val_to_name)( int );
 
-static void CALLBACK capture_callback( unsigned char *user, const struct pcap_pkthdr *hdr, const unsigned char *bytes )
+static void CDECL capture_callback( unsigned char *user, const struct pcap_pkthdr *hdr, const unsigned char *bytes )
 {
     trace( "user %p hdr %p byte %p\n", user, hdr, bytes );
 }
@@ -266,7 +266,7 @@ static void test_datalink( void )
     ok( !strcmp(str, "Ethernet"), "got %s\n", wine_dbgstr_a(str) );
 }
 
-static void CALLBACK dump_callback( unsigned char *user, const struct pcap_pkthdr *hdr, const unsigned char *bytes )
+static void CDECL dump_callback( unsigned char *user, const struct pcap_pkthdr *hdr, const unsigned char *bytes )
 {
     trace( "user %p hdr %p bytes %p\n", user, hdr, bytes );
     ppcap_dump( user, hdr, bytes );
diff --git a/dlls/wpcap/wpcap.c b/dlls/wpcap/wpcap.c
index de4bac33871c..4274e9c90ebc 100644
--- a/dlls/wpcap/wpcap.c
+++ b/dlls/wpcap/wpcap.c
@@ -963,7 +963,7 @@ const unsigned char * CDECL pcap_next( struct pcap *pcap, struct pcap_pkthdr_win
 }
 
 int CDECL pcap_dispatch( struct pcap *pcap, int count,
-                         void (CALLBACK *callback)(unsigned char *, const struct pcap_pkthdr_win32 *, const unsigned char *),
+                         void (CDECL *callback)(unsigned char *, const struct pcap_pkthdr_win32 *, const unsigned char *),
                          unsigned char *user )
 {
     int processed = 0;
@@ -996,7 +996,7 @@ int CDECL pcap_dispatch( struct pcap *pcap, int count,
 }
 
 int CDECL pcap_loop( struct pcap *pcap, int count,
-                     void (CALLBACK *callback)(unsigned char *, const struct pcap_pkthdr_win32 *, const unsigned char *),
+                     void (CDECL *callback)(unsigned char *, const struct pcap_pkthdr_win32 *, const unsigned char *),
                      unsigned char *user)
 {
     int processed = 0;
openSUSE Build Service is sponsored by