SDL: SDL_dynapi.c: add extern "C" guards, just in case..

From 6a52017724e16e803909b882435a8d47dd2b88da Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Thu, 12 Jan 2023 14:01:02 +0300
Subject: [PATCH] SDL_dynapi.c: add extern "C" guards, just in case..

---
 src/dynapi/SDL_dynapi.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/dynapi/SDL_dynapi.c b/src/dynapi/SDL_dynapi.c
index 2902264cf308..cd900ce9b766 100644
--- a/src/dynapi/SDL_dynapi.c
+++ b/src/dynapi/SDL_dynapi.c
@@ -50,6 +50,10 @@
    sparingly. */
 #define SDL_DYNAPI_VERSION 1
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 static void SDL_InitDynamicAPI(void);
 
 /* BE CAREFUL CALLING ANY SDL CODE IN HERE, IT WILL BLOW UP.
@@ -352,6 +356,10 @@ SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize)
     return initialize_jumptable(apiver, table, tablesize);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 /* Obviously we can't use SDL_LoadObject() to load SDL.  :)  */
 /* Also obviously, we never close the loaded library. */
 #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
@@ -420,11 +428,16 @@ static void dynapi_warn(const char *msg)
 /* This is not declared in any header, although it is shared between some
     parts of SDL, because we don't want anything calling it without an
     extremely good reason. */
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern SDL_NORETURN void SDL_ExitProcess(int exitcode);
 #if defined(__WATCOMC__)
-void SDL_ExitProcess(int exitcode);
 #pragma aux SDL_ExitProcess aborts;
 #endif
-SDL_NORETURN void SDL_ExitProcess(int exitcode);
+#ifdef __cplusplus
+}
+#endif
 
 static void SDL_InitDynamicAPILocked(void)
 {