File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ using namespace tulip::hook;
8
8
#if defined(TULIP_HOOK_POSIX)
9
9
10
10
#include < sys/mman.h>
11
+ #include < unistd.h>
11
12
12
13
geode::Result<> PosixTarget::allocatePage () {
13
14
auto const protection = PROT_READ | PROT_WRITE | PROT_EXEC;
@@ -32,7 +33,7 @@ geode::Result<uint32_t> PosixTarget::getProtection(void* address) {
32
33
}
33
34
34
35
geode::Result<> PosixTarget::protectMemory (void * address, size_t size, uint32_t protection) {
35
- auto const pageSize = PAGE_SIZE ;
36
+ auto const pageSize = getpagesize () ;
36
37
auto const pageMask = pageSize - 1 ;
37
38
38
39
auto const ptr = reinterpret_cast <uintptr_t >(address);
@@ -65,4 +66,4 @@ uint32_t PosixTarget::getWritableProtection() {
65
66
return PROT_READ | PROT_WRITE | PROT_EXEC;
66
67
}
67
68
68
- #endif
69
+ #endif
You can’t perform that action at this time.
0 commit comments