소스 검색

general: Fix clang/gcc build errors

ameerj 4 년 전
부모
커밋
866b7c20a8

+ 1 - 0
src/common/alignment.h

@@ -3,6 +3,7 @@
 #pragma once
 
 #include <cstddef>
+#include <new>
 #include <type_traits>
 
 namespace Common {

+ 2 - 0
src/common/atomic_ops.h

@@ -8,6 +8,8 @@
 
 #if _MSC_VER
 #include <intrin.h>
+#else
+#include <cstring>
 #endif
 
 namespace Common {

+ 1 - 0
src/common/fs/file.cpp

@@ -8,6 +8,7 @@
 
 #ifdef _WIN32
 #include <io.h>
+#include <share.h>
 #else
 #include <unistd.h>
 #endif

+ 2 - 0
src/common/fs/fs_util.cpp

@@ -2,6 +2,8 @@
 // Licensed under GPLv2 or any later version
 // Refer to the license.txt file included.
 
+#include <algorithm>
+
 #include "common/fs/fs_util.h"
 
 namespace Common::FS {

+ 1 - 0
src/common/host_memory.cpp

@@ -18,6 +18,7 @@
 #include <fcntl.h>
 #include <sys/mman.h>
 #include <unistd.h>
+#include "common/scope_exit.h"
 
 #endif // ^^^ Linux ^^^
 

+ 1 - 0
src/common/thread.cpp

@@ -4,6 +4,7 @@
 
 #include <string>
 
+#include "common/error.h"
 #include "common/logging/log.h"
 #include "common/thread.h"
 #ifdef __APPLE__

+ 1 - 0
src/common/uint128.h

@@ -12,6 +12,7 @@
 #pragma intrinsic(_umul128)
 #pragma intrinsic(_udiv128)
 #else
+#include <cstring>
 #include <x86intrin.h>
 #endif
 

+ 1 - 4
src/core/crypto/key_manager.h

@@ -5,6 +5,7 @@
 #pragma once
 
 #include <array>
+#include <filesystem>
 #include <map>
 #include <optional>
 #include <string>
@@ -15,10 +16,6 @@
 #include "common/common_types.h"
 #include "core/crypto/partition_data_manager.h"
 
-namespace std::filesystem {
-class path;
-}
-
 namespace Common::FS {
 class IOFile;
 }

+ 4 - 0
src/core/file_sys/patch_manager.cpp

@@ -10,6 +10,10 @@
 #include "common/hex_util.h"
 #include "common/logging/log.h"
 #include "common/settings.h"
+#ifndef _WIN32
+#include "common/string_util.h"
+#endif
+
 #include "core/core.h"
 #include "core/file_sys/common_funcs.h"
 #include "core/file_sys/content_archive.h"

+ 1 - 0
src/shader_recompiler/frontend/ir/opcodes.h

@@ -4,6 +4,7 @@
 
 #pragma once
 
+#include <algorithm>
 #include <array>
 
 #include <fmt/format.h>

+ 1 - 0
src/video_core/renderer_vulkan/vk_descriptor_pool.cpp

@@ -2,6 +2,7 @@
 // Licensed under GPLv2 or any later version
 // Refer to the license.txt file included.
 
+#include <algorithm>
 #include <mutex>
 #include <span>
 #include <vector>

+ 1 - 0
src/video_core/textures/astc.cpp

@@ -16,6 +16,7 @@
 // <http://gamma.cs.unc.edu/FasTC/>
 
 #include <algorithm>
+#include <bit>
 #include <cassert>
 #include <cstring>
 #include <span>