-/* 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 {{{ */
address.sun_family = AF_UNIX;
strcpy(address.sun_path, path);
- _syscall(connect(socket, reinterpret_cast<sockaddr *>(&address), SUN_LEN(&address)));
+ _syscall(connect(socket, reinterpret_cast<sockaddr *>(&address), sizeof(address)));
CYInitializeDynamic();
CYHandleClient(socket);
if (handle == NULL) {
Dl_info info;
_assert(dladdr(reinterpret_cast<void *>(&MSmain0), &info) != 0);
+#ifdef __ANDROID__
+ handle = dlopen(info.dli_fname, 0);
+#else
handle = dlopen(info.dli_fname, RTLD_NOLOAD);
+#endif
}
return NULL;