From 6795cd8db5ffab674f2a477d8b7b8cc0e3ab406e Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 19 Feb 2015 11:36:53 -0800 Subject: [PATCH] Fix Windows adb build. Change-Id: I560bedfcf77556b36acadc19f5dac71b3628ea2b --- adb/adb.c | 8 -------- adb/adb_listeners.c | 2 -- adb/adb_main.c | 10 +++++++++- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/adb/adb.c b/adb/adb.c index f15902b2d..d1f05e413 100644 --- a/adb/adb.c +++ b/adb/adb.c @@ -542,14 +542,6 @@ void handle_packet(apacket *p, atransport *t) put_apacket(p); } -#if defined(_WIN32) -static BOOL WINAPI ctrlc_handler(DWORD type) -{ - exit(STATUS_CONTROL_C_EXIT); - return TRUE; -} -#endif - #if ADB_HOST int launch_server(int server_port) diff --git a/adb/adb_listeners.c b/adb/adb_listeners.c index e9d3c22ab..76a03ebff 100644 --- a/adb/adb_listeners.c +++ b/adb/adb_listeners.c @@ -16,8 +16,6 @@ #include "adb_listeners.h" -#include - #include "sysdeps.h" int gListenAll = 0; /* Not static because it is used in commandline.c. */ diff --git a/adb/adb_main.c b/adb/adb_main.c index 72168ec36..5e06a13f4 100644 --- a/adb/adb_main.c +++ b/adb/adb_main.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "adb.h" #include "adb_auth.h" @@ -29,6 +28,7 @@ #if !ADB_HOST #include +#include #include "cutils/properties.h" #include "private/android_filesystem_config.h" @@ -42,6 +42,14 @@ static void adb_cleanup(void) usb_cleanup(); } +#if defined(_WIN32) +static BOOL WINAPI ctrlc_handler(DWORD type) +{ + exit(STATUS_CONTROL_C_EXIT); + return TRUE; +} +#endif + #if ADB_HOST #ifdef WORKAROUND_BUG6558362 #include