summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/files_unittest.cc4
-rw-r--r--src/utils/mathutils.h3
-rw-r--r--src/utils/sdl2helper.h1
-rw-r--r--src/utils/sdlhelper.h1
4 files changed, 5 insertions, 4 deletions
diff --git a/src/utils/files_unittest.cc b/src/utils/files_unittest.cc
index db56e03e9..5ccfe0e04 100644
--- a/src/utils/files_unittest.cc
+++ b/src/utils/files_unittest.cc
@@ -27,10 +27,6 @@
#include "resources/resourcemanager/resourcemanager.h"
-#ifndef USE_SDL2
-#include <SDL.h>
-#endif // USE_SDL2
-
#include "debug.h"
TEST_CASE("Files renameFile")
diff --git a/src/utils/mathutils.h b/src/utils/mathutils.h
index 4bc3cf104..c2578e487 100644
--- a/src/utils/mathutils.h
+++ b/src/utils/mathutils.h
@@ -24,7 +24,10 @@
#define UTILS_MATHUTILS_H
#include <string>
+
+#ifndef USE_SDL2
#include <cmath>
+#endif
#include "localconsts.h"
diff --git a/src/utils/sdl2helper.h b/src/utils/sdl2helper.h
index 7cf471542..da1faeba0 100644
--- a/src/utils/sdl2helper.h
+++ b/src/utils/sdl2helper.h
@@ -27,6 +27,7 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#include <SDL_stdinc.h>
+_SDL_stdinc_h
#pragma GCC diagnostic pop
#include <SDL_thread.h>
diff --git a/src/utils/sdlhelper.h b/src/utils/sdlhelper.h
index 89cd3f789..e75af2be2 100644
--- a/src/utils/sdlhelper.h
+++ b/src/utils/sdlhelper.h
@@ -23,6 +23,7 @@
#ifdef USE_SDL2
#include "utils/sdl2helper.h"
+UTILS_SDL2HELPER_H
#else
#include "utils/stringvector.h"