From: Jay Freeman (saurik) Date: Thu, 2 Jan 2014 06:27:38 +0000 (-0800) Subject: Fix (again) process injection on desktop Mac OS X. X-Git-Tag: v0.9.500~112 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/e1858938edb5148e248d2035b55d3cb7c855770d Fix (again) process injection on desktop Mac OS X. --- diff --git a/Trampoline.t.cpp b/Trampoline.t.cpp index 297486e..1bcbb18 100644 --- a/Trampoline.t.cpp +++ b/Trampoline.t.cpp @@ -20,12 +20,15 @@ /* }}} */ #include +#if defined(__arm__) || defined(__arm64__) #undef TARGET_IPHONE_SIMULATOR #define TARGET_IPHONE_SIMULATOR 1 +#endif #define _PTHREAD_ATTR_T #include +#if defined(__arm__) || defined(__arm64__) #undef TARGET_IPHONE_SIMULATOR -#define TARGET_IPHONE_SIMULATOR 0 +#endif #include #include @@ -250,6 +253,8 @@ extern "C" void Start(Baton *baton) { tsd = reinterpret_cast(tpid & ~3); if (tsd != NULL) tsd[0] = &self; +#else + _pthread_setspecific_direct(0, &self); #endif int (*$pthread_join)(pthread_t, void **);