summaryrefslogtreecommitdiffstats
path: root/netwerk/sctp/src/win32-free.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /netwerk/sctp/src/win32-free.patch
parentInitial commit. (diff)
downloadfirefox-e51783d008170d9ab27d25da98ca3a38b0a41b67.tar.xz
firefox-e51783d008170d9ab27d25da98ca3a38b0a41b67.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'netwerk/sctp/src/win32-free.patch')
-rw-r--r--netwerk/sctp/src/win32-free.patch55
1 files changed, 55 insertions, 0 deletions
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__)