mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-03-04 07:15:30 +00:00
Use preprocessor for 64bit detection
This commit is contained in:
parent
7c1d2ec61e
commit
049db49dc8
@ -39,7 +39,11 @@ int remote_get_info(int uid, const char *process, uint32_t *flags, vector<int> &
|
||||
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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user