Better fix for iOS build
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
diff --git a/src/SDL.c b/src/SDL.c
index aa09b95..2990e06 100644
--- a/src/SDL.c
+++ b/src/SDL.c
@@ -22,9 +22,9 @@
#if defined(__WIN32__)
#include "core/windows/SDL_windows.h"
+#elif !defined(__WINRT__)
+#include <unistd.h> // For _exit(), etc.
#endif
-#if defined(__IPHONEOS__)
-#include <unistd.h>
#endif
#if defined(__EMSCRIPTEN__)
diff --git a/src/SDL_assert.c b/src/SDL_assert.c
index ea97157..3243a76 100644
--- a/src/SDL_assert.c
+++ b/src/SDL_assert.c
@@ -36,12 +36,9 @@
#ifndef WS_OVERLAPPEDWINDOW
#define WS_OVERLAPPEDWINDOW 0
#endif
-#else /* fprintf, _exit(), etc. */
+#else /* fprintf, etc. */
#include <stdio.h>
#include <stdlib.h>
-#if ! defined(__WINRT__)
-#include <unistd.h>
-#endif
#endif
#if defined(__EMSCRIPTEN__)
@@ -124,10 +121,10 @@ static void SDL_GenerateAssertionReport(void)
parts of SDL, because we don't want anything calling it without an
extremely good reason. */
#if defined(__WATCOMC__)
-void SDL_ExitProcess(const int exitcode);
+extern void SDL_ExitProcess(const int exitcode);
#pragma aux SDL_ExitProcess aborts;
#endif
-SDL_NORETURN void SDL_ExitProcess(const int exitcode);
+extern SDL_NORETURN void SDL_ExitProcess(const int exitcode);
#if defined(__WATCOMC__)