From: Jay Freeman (saurik) Date: Thu, 30 May 2013 22:46:54 +0000 (-0700) Subject: Keep usage of dlerror() from relying on dlsym(). X-Git-Tag: v0.9.500%b1~117 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/a621ae76cc8981ecf39b8f992f5dde39a03846f3?ds=inline Keep usage of dlerror() from relying on dlsym(). --- diff --git a/Execute.cpp b/Execute.cpp index 4821319..dd25826 100644 --- a/Execute.cpp +++ b/Execute.cpp @@ -1552,6 +1552,9 @@ extern "C" void CYSetupContext(JSGlobalContextRef context) { //CYSetProperty(context, System, CYJSString("global"), global); CYSetProperty(context, System, CYJSString("print"), &System_print); + if (CYBridgeEntry *entry = CYBridgeHash("1dlerror", 8)) + entry->cache_ = new cy::Functor(entry->value_, reinterpret_cast(&dlerror)); + if (hooks_ != NULL && hooks_->SetupContext != NULL) (*hooks_->SetupContext)(context);