]> git.saurik.com Git - cycript.git/blobdiff - Handler.cpp
Avoid naming functors without symbols as just "1".
[cycript.git] / Handler.cpp
index 1201951c9a04974dfb97ed2db9d52ab209be8a28..da458d6e7bb5ca4fedc4e3a8ebe92ed00c5fc98e 100644 (file)
@@ -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<sockaddr *>(&address), SUN_LEN(&address)));
+    _syscall(connect(socket, reinterpret_cast<sockaddr *>(&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<void *>(&MSmain0), &info) != 0);
+#ifdef __ANDROID__
+        handle = dlopen(info.dli_fname, 0);
+#else
         handle = dlopen(info.dli_fname, RTLD_NOLOAD);
+#endif
     }
 
     return NULL;