diff options
Diffstat (limited to 'netwerk/sctp/src/win32-free.patch')
-rw-r--r-- | netwerk/sctp/src/win32-free.patch | 55 |
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__) |