From 18bee21cfc907344a24e8b1a521e05bd3bb239fb Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 23 Nov 2017 23:46:23 +0800 Subject: [PATCH] Add support to build with NDK r10e --- su_socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/su_socket.c b/su_socket.c index 13f71c9e6..755668fde 100644 --- a/su_socket.c +++ b/su_socket.c @@ -12,7 +12,6 @@ #include #include #include -#include #include "magisk.h" #include "utils.h" @@ -29,7 +28,7 @@ int socket_create_temp(char *path, size_t len) { memset(&sun, 0, sizeof(sun)); sun.sun_family = AF_LOCAL; - snprintf(path, len, "/dev/.socket%d", (int) syscall(SYS_gettid)); + snprintf(path, len, "/dev/.socket%d", getpid()); strcpy(sun.sun_path, path); /*