diff options
author | comex | 2015-03-03 14:11:31 -0500 |
---|---|---|
committer | comex | 2015-03-03 14:11:39 -0500 |
commit | 0c8985d090df2eeb1d703bd71ba48ee06daa2b18 (patch) | |
tree | 2729f8ec081fe73e6be0b861fd04ab012ce166d6 /lib/darwin/inject.c | |
parent | Merge pull request #2 from evilGoldfish/master (diff) | |
download | substitute-0c8985d090df2eeb1d703bd71ba48ee06daa2b18.tar.gz |
fixes for compiling on older OS X
Diffstat (limited to '')
-rw-r--r-- | lib/darwin/inject.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/darwin/inject.c b/lib/darwin/inject.c index 0f67ccb..14b204b 100644 --- a/lib/darwin/inject.c +++ b/lib/darwin/inject.c @@ -615,7 +615,11 @@ int substitute_dlopen_in_pid(int pid, const char *filename, int options, inject_start_arm[], inject_start_arm64[]; - int target_page_size = cputype == CPU_TYPE_ARM64 ? 0x4000 : 0x1000; + int target_page_size = +#if defined(__arm__) || defined(__arm64__) + cputype == CPU_TYPE_ARM64 ? 0x4000 : +#endif + 0x1000; kr = mach_vm_allocate(task, &target_stack, 2 * target_page_size, VM_FLAGS_ANYWHERE); if (kr) { asprintf(error, "couldn't allocate target stack"); |