SDL: SDL_malloc.c: workaround calling convention issues for real_xxx procs.

From ec1a0f62dd37c8ccc8b8e8cb7e5faa1f3948c81c Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Tue, 17 May 2022 01:33:02 +0300
Subject: [PATCH] SDL_malloc.c: workaround calling convention issues for
 real_xxx procs.

---
 src/stdlib/SDL_malloc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/stdlib/SDL_malloc.c b/src/stdlib/SDL_malloc.c
index b5dd6414f64..7dc5a4211d3 100644
--- a/src/stdlib/SDL_malloc.c
+++ b/src/stdlib/SDL_malloc.c
@@ -5305,10 +5305,10 @@ mspace_mallopt(int param_number, int value)
 #endif /* !HAVE_MALLOC */
 
 #ifdef HAVE_MALLOC
-#define real_malloc malloc
-#define real_calloc calloc
-#define real_realloc realloc
-#define real_free free
+static void* SDLCALL real_malloc(size_t s) { return malloc(s); }
+static void* SDLCALL real_calloc(size_t n, size_t s) { return calloc(n, s); }
+static void* SDLCALL real_realloc(void *p, size_t s) { return realloc(p,s); }
+static void  SDLCALL real_free(void *p) { free(p); }
 #else
 #define real_malloc dlmalloc
 #define real_calloc dlcalloc