X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/7341eedbaf526ef2f0986b576c656906050e270a..226edb709e84d365649e44f12fbf33e9edddfae3:/Handler.cpp?ds=sidebyside diff --git a/Handler.cpp b/Handler.cpp index 1201951..da458d6 100644 --- a/Handler.cpp +++ b/Handler.cpp @@ -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;