Fix the build.
Conditionally compile code that is intended to run inside the emulator only. Change-Id: Ie82e415b2ff52395616f85871dddb38e65b0ed55
This commit is contained in:
parent
ea36579f77
commit
c4f37eed73
1 changed files with 7 additions and 0 deletions
|
|
@ -185,6 +185,8 @@ static void *server_socket_thread(void * arg)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This is relevant only for ADB daemon running inside the emulator. */
|
||||||
|
#if !ADB_HOST
|
||||||
/*
|
/*
|
||||||
* Redefine open and write for qemu_pipe.h that contains inlined references
|
* Redefine open and write for qemu_pipe.h that contains inlined references
|
||||||
* to those routines. We will redifine them back after qemu_pipe.h inclusion.
|
* to those routines. We will redifine them back after qemu_pipe.h inclusion.
|
||||||
|
|
@ -292,6 +294,7 @@ static const char _ok_resp[] = "ok";
|
||||||
D("transport: qemu_socket_thread() exiting\n");
|
D("transport: qemu_socket_thread() exiting\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif // !ADB_HOST
|
||||||
|
|
||||||
void local_init(int port)
|
void local_init(int port)
|
||||||
{
|
{
|
||||||
|
|
@ -301,6 +304,9 @@ void local_init(int port)
|
||||||
if(HOST) {
|
if(HOST) {
|
||||||
func = client_socket_thread;
|
func = client_socket_thread;
|
||||||
} else {
|
} else {
|
||||||
|
#if ADB_HOST
|
||||||
|
func = server_socket_thread;
|
||||||
|
#else
|
||||||
/* For the adbd daemon in the system image we need to distinguish
|
/* For the adbd daemon in the system image we need to distinguish
|
||||||
* between the device, and the emulator. */
|
* between the device, and the emulator. */
|
||||||
char is_qemu[PROPERTY_VALUE_MAX];
|
char is_qemu[PROPERTY_VALUE_MAX];
|
||||||
|
|
@ -312,6 +318,7 @@ void local_init(int port)
|
||||||
/* Running inside the device: use TCP socket as the transport. */
|
/* Running inside the device: use TCP socket as the transport. */
|
||||||
func = server_socket_thread;
|
func = server_socket_thread;
|
||||||
}
|
}
|
||||||
|
#endif !ADB_HOST
|
||||||
}
|
}
|
||||||
|
|
||||||
D("transport: local %s init\n", HOST ? "client" : "server");
|
D("transport: local %s init\n", HOST ? "client" : "server");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue