From 2105c7f6edde487d5e2281d1c4efede963490d96 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Thu, 6 Oct 2022 00:58:26 +0200
Subject: [PATCH] SDL_thread.c: fix unused function SDL_FreeErrBuf when
building without thread support (emscripten)
---
src/thread/SDL_thread.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c
index 65610339c40b..4e51be68babd 100644
--- a/src/thread/SDL_thread.c
+++ b/src/thread/SDL_thread.c
@@ -211,6 +211,7 @@ SDL_GetStaticErrBuf()
return &SDL_global_error;
}
+#if !SDL_THREADS_DISABLED
static void SDLCALL
SDL_FreeErrBuf(void *data)
{
@@ -221,6 +222,7 @@ SDL_FreeErrBuf(void *data)
}
errbuf->free_func(errbuf);
}
+#endif
/* Routine to get the thread-specific error variable */
SDL_error *