From b211342d8aeb3a83fd1977fcdff3bb523ef0cc09 Mon Sep 17 00:00:00 2001 From: Stefanos Kornilios Mitsis Poiitidis Date: Fri, 7 Jul 2023 13:49:46 +0300 Subject: [PATCH] linux: Fix build --- src/Core/Memory.cpp | 14 +++++++++++++- src/Core/PS4/HLE/LibC.cpp | 5 ++++- src/Lib/Timer.h | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/Core/Memory.cpp b/src/Core/Memory.cpp index 294c8d60..39449176 100644 --- a/src/Core/Memory.cpp +++ b/src/Core/Memory.cpp @@ -7,12 +7,24 @@ #include #endif +#if !defined(_WIN64) +enum PosixPageProtection +{ + PAGE_NOACCESS = 0, + PAGE_READONLY = PROT_READ, + PAGE_READWRITE = PROT_READ | PROT_WRITE, + PAGE_EXECUTE = PROT_EXEC, + PAGE_EXECUTE_READ = PROT_EXEC | PROT_READ, + PAGE_EXECUTE_READWRITE = PROT_EXEC | PROT_READ | PROT_WRITE +}; +#endif + #include "../Util/Log.h" namespace Memory { namespace VirtualMemory { - static DWORD convertMemoryMode(MemoryMode mode) + static u32 convertMemoryMode(MemoryMode mode) { switch (mode) { diff --git a/src/Core/PS4/HLE/LibC.cpp b/src/Core/PS4/HLE/LibC.cpp index 73fc4d2f..1ae10613 100644 --- a/src/Core/PS4/HLE/LibC.cpp +++ b/src/Core/PS4/HLE/LibC.cpp @@ -5,7 +5,10 @@ namespace HLE::Libs::LibC { static void init_env() //every game/demo should probably { - __debugbreak();//if we reach here it will be a great progress :D + for(;;) { + printf("__debugbreak\n"); + } + //__debugbreak();//if we reach here it will be a great progress :D } void LibC_RegisterFunc(SymbolsResolver* sym) diff --git a/src/Lib/Timer.h b/src/Lib/Timer.h index 5066d2e8..cdb0cc42 100644 --- a/src/Lib/Timer.h +++ b/src/Lib/Timer.h @@ -1,6 +1,6 @@ #pragma once -#include "../Types.h" +#include "../types.h" namespace Lib { class Timer final