42 lines
1.6 KiB
Diff
42 lines
1.6 KiB
Diff
From 66d94d8c304240d0729bd3fd077ba61ade0a97e7 Mon Sep 17 00:00:00 2001
|
|
From: Lin Huang <hl@rock-chips.com>
|
|
Date: Thu, 16 May 2019 09:28:03 +0800
|
|
Subject: [PATCH 14/20] adbd: Fix adb forward issue
|
|
|
|
Signed-off-by: Lin Huang <hl@rock-chips.com>
|
|
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
|
|
---
|
|
core/adbd/services.c | 2 +-
|
|
core/libcutils/socket_local_client.c | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/core/adbd/services.c b/core/adbd/services.c
|
|
index e4eedc9..03140e7 100644
|
|
--- a/core/adbd/services.c
|
|
+++ b/core/adbd/services.c
|
|
@@ -431,7 +431,7 @@ int service_to_fd(const char *name)
|
|
#ifndef HAVE_WINSOCK /* winsock doesn't implement unix domain sockets */
|
|
} else if(!strncmp(name, "local:", 6)) {
|
|
ret = socket_local_client(name + 6,
|
|
- ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM);
|
|
+ ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM);
|
|
} else if(!strncmp(name, "localreserved:", 14)) {
|
|
ret = socket_local_client(name + 14,
|
|
ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM);
|
|
diff --git a/core/libcutils/socket_local_client.c b/core/libcutils/socket_local_client.c
|
|
index 036ce2e..4ab600f 100644
|
|
--- a/core/libcutils/socket_local_client.c
|
|
+++ b/core/libcutils/socket_local_client.c
|
|
@@ -50,7 +50,7 @@ int socket_make_sockaddr_un(const char *name, int namespaceId,
|
|
|
|
switch (namespaceId) {
|
|
case ANDROID_SOCKET_NAMESPACE_ABSTRACT:
|
|
-#ifdef HAVE_LINUX_LOCAL_SOCKET_NAMESPACE
|
|
+#if defined(__linux__)
|
|
namelen = strlen(name);
|
|
|
|
// Test with length +1 for the *initial* '\0'.
|
|
--
|
|
2.20.1
|
|
|