feat(video_core): Fix Linux compilation issues in Hybrid Memory Manager

- Added missing <thread> header for std::thread usage
- Added <fcntl.h> for O_CLOEXEC and O_NONBLOCK definitions
- Fixed struct initialization order in uffdio_copy to match declaration order

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron 2025-04-12 17:50:39 +10:00 committed by MrPurple666
parent 34693001aa
commit 777111dfb4
2 changed files with 3 additions and 1 deletions

View file

@ -15,6 +15,7 @@
#include <sys/syscall.h> #include <sys/syscall.h>
#include <linux/userfaultfd.h> #include <linux/userfaultfd.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <fcntl.h>
#elif defined(_WIN32) #elif defined(_WIN32)
#include <windows.h> #include <windows.h>
#endif #endif
@ -263,8 +264,8 @@ void FaultManagedAllocator::FaultThread() {
if (page) { if (page) {
struct uffdio_copy copy = { struct uffdio_copy copy = {
.src = (uintptr_t)page,
.dst = (uintptr_t)addr, .dst = (uintptr_t)addr,
.src = (uintptr_t)page,
.len = PageSize, .len = PageSize,
.mode = 0 .mode = 0
}; };

View file

@ -13,6 +13,7 @@
#include <list> #include <list>
#include <set> #include <set>
#include <map> #include <map>
#include <thread>
#include "common/common_types.h" #include "common/common_types.h"
#include "video_core/vulkan_common/vulkan_device.h" #include "video_core/vulkan_common/vulkan_device.h"