aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-02-11 14:33:35 +0100
committerShauren <shauren.trinity@gmail.com>2022-02-11 14:33:35 +0100
commitcbcd149ce508dfe8ff508391f9e32b7dc2cfbe5c (patch)
treea0b8f575b1fba587e90781e43b4f94f4bbc7a812 /src/common
parent5b02c53fc568edd96ab557a8dd4d0195bcc9ec8c (diff)
Core/Misc: Explicitly include required headers instead of relying on them to be included by other headers
Diffstat (limited to 'src/common')
-rw-r--r--src/common/DataStores/DB2FileLoader.cpp2
-rw-r--r--src/common/Debugging/Errors.cpp2
-rw-r--r--src/common/Threading/ProcessPriority.cpp1
3 files changed, 5 insertions, 0 deletions
diff --git a/src/common/DataStores/DB2FileLoader.cpp b/src/common/DataStores/DB2FileLoader.cpp
index 71475a2a2d9..fc5337a452e 100644
--- a/src/common/DataStores/DB2FileLoader.cpp
+++ b/src/common/DataStores/DB2FileLoader.cpp
@@ -20,8 +20,10 @@
#include "DB2Meta.h"
#include "Errors.h"
#include "Log.h"
+#include <limits>
#include <sstream>
#include <system_error>
+#include <cstring>
enum class DB2ColumnCompression : uint32
{
diff --git a/src/common/Debugging/Errors.cpp b/src/common/Debugging/Errors.cpp
index d61f7fa60bb..6bb22c567de 100644
--- a/src/common/Debugging/Errors.cpp
+++ b/src/common/Debugging/Errors.cpp
@@ -35,10 +35,12 @@
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
#include <Windows.h>
+#include <intrin.h>
#define Crash(message) \
ULONG_PTR execeptionArgs[] = { reinterpret_cast<ULONG_PTR>(strdup(message)), reinterpret_cast<ULONG_PTR>(_ReturnAddress()) }; \
RaiseException(EXCEPTION_ASSERTION_FAILURE, 0, 2, execeptionArgs);
#else
+#include <cstring>
// should be easily accessible in gdb
extern "C" { TC_COMMON_API char const* TrinityAssertionFailedMessage = nullptr; }
#define Crash(message) \
diff --git a/src/common/Threading/ProcessPriority.cpp b/src/common/Threading/ProcessPriority.cpp
index 3428a56258c..aafc1c49b04 100644
--- a/src/common/Threading/ProcessPriority.cpp
+++ b/src/common/Threading/ProcessPriority.cpp
@@ -21,6 +21,7 @@
#ifdef _WIN32 // Windows
#include <Windows.h>
#elif defined(__linux__)
+#include <cstring>
#include <sched.h>
#include <sys/resource.h>
#define PROCESS_HIGH_PRIORITY -15 // [-20, 19], default is 0