From a8430a11444914ebe6e815af5aceef5e2a6b5886 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] package: android-tools: fix adb forward bug
|
|
rknn-toolkit need this patch to fix transfer bug
|
|
Change-Id: I1e8cd4447b5d85202170ad0945e4311e1299ca22
|
Signed-off-by: Lin Huang <hl@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.7.4
|