X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/20052ff75c224699725da0f8e096053009c62741..1e8d80477a3e058a30c477955f1e0c56deb6e956:/Handler.cpp diff --git a/Handler.cpp b/Handler.cpp index a49fcb6..da458d6 100644 --- a/Handler.cpp +++ b/Handler.cpp @@ -1,5 +1,5 @@ -/* Cycript - Optimizing JavaScript Compiler/Runtime - * Copyright (C) 2009-2015 Jay Freeman (saurik) +/* Cycript - The Truly Universal Scripting Language + * Copyright (C) 2009-2016 Jay Freeman (saurik) */ /* GNU Affero General Public License, Version 3 {{{ */ @@ -166,7 +166,7 @@ static void CYHandleSocket(const char *path) { address.sun_family = AF_UNIX; strcpy(address.sun_path, path); - _syscall(connect(socket, reinterpret_cast(&address), SUN_LEN(&address))); + _syscall(connect(socket, reinterpret_cast(&address), sizeof(address))); CYInitializeDynamic(); CYHandleClient(socket); @@ -189,7 +189,11 @@ _extern char *MSmain0(int argc, char *argv[]) { try { if (handle == NULL) { Dl_info info; _assert(dladdr(reinterpret_cast(&MSmain0), &info) != 0); +#ifdef __ANDROID__ + handle = dlopen(info.dli_fname, 0); +#else handle = dlopen(info.dli_fname, RTLD_NOLOAD); +#endif } return NULL;