Commit 2105c7f6edde487d5e2281d1c4efede963490d96

Anonymous Maarten 2022-10-06T00:58:26

SDL_thread.c: fix unused function SDL_FreeErrBuf when building without thread support (emscripten)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c
index 6561033..4e51be6 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 *