Procházet zdrojové kódy

thread: Fix build, if SDL is built without an external C runtime.

Fixes #9858.
Ryan C. Gordon před 1 rokem
rodič
revize
48ebc829e4
1 změnil soubory, kde provedl 8 přidání a 0 odebrání
  1. 8 0
      src/SDL_internal.h

+ 8 - 0
src/SDL_internal.h

@@ -265,6 +265,14 @@
 #error SDL_RENDER enabled without any backend drivers.
 #endif
 
+#if !defined(HAVE_LIBC)
+// If not using _any_ C runtime, these have to be defined before SDL_thread.h
+// gets included, so SDL_CreateThread calls won't try to reference the
+// (unavailable and unneeded) _beginthreadex/_endthreadex functions.
+#define SDL_BeginThreadFunction NULL
+#define SDL_EndThreadFunction NULL
+#endif
+
 #include <SDL3/SDL.h>
 #include <SDL3/SDL_intrin.h>