diff --git a/native/src/core/zygisk/entry.cpp b/native/src/core/zygisk/entry.cpp index 2ec115c32..69ba7528a 100644 --- a/native/src/core/zygisk/entry.cpp +++ b/native/src/core/zygisk/entry.cpp @@ -39,7 +39,11 @@ int remote_get_info(int uid, const char *process, uint32_t *flags, vector & if (int fd = zygisk_request(ZygiskRequest::GET_INFO); fd >= 0) { write_int(fd, uid); write_string(fd, process); - write_int(fd, sizeof(void*) == 8 ? 1 : 0); +#ifdef __LP64__ + write_int(fd, 1); +#else + write_int(fd, 0); +#endif xxread(fd, flags, sizeof(*flags)); if (should_load_modules(*flags)) { fds = recv_fds(fd); diff --git a/native/src/core/zygisk/module.cpp b/native/src/core/zygisk/module.cpp index ca5645fec..058611655 100644 --- a/native/src/core/zygisk/module.cpp +++ b/native/src/core/zygisk/module.cpp @@ -78,7 +78,11 @@ bool ZygiskModule::valid() const { int ZygiskModule::connectCompanion() const { if (int fd = zygisk_request(ZygiskRequest::CONNECT_COMPANION); fd >= 0) { - write_int(fd, sizeof(void*) == 8 ? 1 : 0); +#ifdef __LP64__ + write_int(fd, 1); +#else + write_int(fd, 0); +#endif write_int(fd, id); return fd; }