Fix Windows adb build.
Change-Id: I560bedfcf77556b36acadc19f5dac71b3628ea2b
diff --git a/adb/adb_main.c b/adb/adb_main.c
index 72168ec..5e06a13 100644
--- a/adb/adb_main.c
+++ b/adb/adb_main.c
@@ -20,7 +20,6 @@
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
-#include <sys/prctl.h>
#include "adb.h"
#include "adb_auth.h"
@@ -29,6 +28,7 @@
#if !ADB_HOST
#include <getopt.h>
+#include <sys/prctl.h>
#include "cutils/properties.h"
#include "private/android_filesystem_config.h"
@@ -42,6 +42,14 @@
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 <sched.h>