From f91259a8f0d75d721761d588a4b811427565c984 Mon Sep 17 00:00:00 2001 From: JP Abgrall Date: Fri, 30 Mar 2012 13:19:11 -0700 Subject: adb: fix non-linux builds. tcpip:, root:, usb: are not for ADB_HOST The handling of adb root:/tpcip:/usb: is normally only for non-ADB_HOST. This avoids getuid() being invoked on windows builds. Change-Id: I365b81d9f70de99b9347d3eac82e690a8ac5e747 --- adb/sockets.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'adb') diff --git a/adb/sockets.c b/adb/sockets.c index 72151b4..91db951 100644 --- a/adb/sockets.c +++ b/adb/sockets.c @@ -426,12 +426,14 @@ asocket *create_local_service_socket(const char *name) s = create_local_socket(fd); D("LS(%d): bound to '%s' via %d\n", s->id, name, fd); +#if !ADB_HOST if ((!strcmp(name, "root:") && getuid() != 0) || !strcmp(name, "usb:") || !strcmp(name, "tcpip:")) { D("LS(%d): enabling exit_on_close\n", s->id); s->exit_on_close = 1; } +#endif return s; } -- cgit v1.1