From 97c135350b7004fedf73884720e6e0e9efd431e8 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 25 Apr 2010 05:54:07 +0000 Subject: [PATCH] Even larger temporary hack to make 64-bit work. --- Mach/Inject.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Mach/Inject.cpp b/Mach/Inject.cpp index 8de0eaa..0f89bb2 100644 --- a/Mach/Inject.cpp +++ b/Mach/Inject.cpp @@ -80,15 +80,18 @@ void InjectLibrary(pid_t pid) { uintptr_t set_self_internal; uintptr_t set_self_external; +#if defined(__i386__) struct nlist nl[3]; memset(nl, 0, sizeof(nl)); -#if defined(__i386__) nl[0].n_un.n_name = (char *) "__pthread_set_self"; nl[1].n_un.n_name = (char *) "___pthread_set_self"; -#endif nlist("/usr/lib/libSystem.B.dylib", nl); nlset(set_self_internal, nl, 0); nlset(set_self_external, nl, 1); +#else + set_self_internal = 0; + set_self_external = 0; +#endif baton->_pthread_set_self = reinterpret_cast(reinterpret_cast(&__pthread_set_self) - set_self_external + set_self_internal); -- 2.45.2