From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- netwerk/sctp/src/win32-free.patch | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 netwerk/sctp/src/win32-free.patch (limited to 'netwerk/sctp/src/win32-free.patch') diff --git a/netwerk/sctp/src/win32-free.patch b/netwerk/sctp/src/win32-free.patch new file mode 100644 index 0000000000..566b774b46 --- /dev/null +++ b/netwerk/sctp/src/win32-free.patch @@ -0,0 +1,55 @@ +diff --git a/netinet/sctp_bsd_addr.c b/netinet/sctp_bsd_addr.c +--- a/netinet/sctp_bsd_addr.c ++++ b/netinet/sctp_bsd_addr.c +@@ -304,14 +304,7 @@ sctp_is_vmware_interface(struct ifnet *ifn) + #endif + + #if defined(_WIN32) && defined(__Userspace__) +-#ifdef MALLOC +-#undef MALLOC +-#define MALLOC(x) HeapAlloc(GetProcessHeap(), 0, (x)) +-#endif +-#ifdef FREE +-#undef FREE +-#define FREE(x) HeapFree(GetProcessHeap(), 0, (x)) +-#endif ++#define SCTP_BSD_FREE(x) HeapFree(GetProcessHeap(), 0, (x)) + static void + sctp_init_ifns_for_vrf(int vrfid) + { +@@ -341,7 +334,7 @@ sctp_init_ifns_for_vrf(int vrfid) + /* Get actual adapter information */ + if ((Err = GetAdaptersAddresses(AF_INET, 0, NULL, pAdapterAddrs, &AdapterAddrsSize)) != ERROR_SUCCESS) { + SCTP_PRINTF("GetAdaptersV4Addresses() failed with error code %d\n", Err); +- FREE(pAdapterAddrs); ++ SCTP_BSD_FREE(pAdapterAddrs); + return; + } + /* Enumerate through each returned adapter and save its information */ +@@ -366,7 +359,7 @@ sctp_init_ifns_for_vrf(int vrfid) + } + } + } +- FREE(pAdapterAddrs); ++ SCTP_BSD_FREE(pAdapterAddrs); + #endif + #ifdef INET6 + AdapterAddrsSize = 0; +@@ -386,7 +379,7 @@ sctp_init_ifns_for_vrf(int vrfid) + /* Get actual adapter information */ + if ((Err = GetAdaptersAddresses(AF_INET6, 0, NULL, pAdapterAddrs, &AdapterAddrsSize)) != ERROR_SUCCESS) { + SCTP_PRINTF("GetAdaptersV6Addresses() failed with error code %d\n", Err); +- FREE(pAdapterAddrs); ++ SCTP_BSD_FREE(pAdapterAddrs); + return; + } + /* Enumerate through each returned adapter and save its information */ +@@ -408,7 +401,7 @@ sctp_init_ifns_for_vrf(int vrfid) + } + } + } +- FREE(pAdapterAddrs); ++ SCTP_BSD_FREE(pAdapterAddrs); + #endif + } + #elif defined(__Userspace__) -- cgit v1.2.3