From e1858938edb5148e248d2035b55d3cb7c855770d Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 1 Jan 2014 22:27:38 -0800 Subject: [PATCH] Fix (again) process injection on desktop Mac OS X. --- Trampoline.t.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 **); -- 2.47.2