From 67a7a4ae274ebd873a78e791b96da35a210db0cc Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Thu, 6 Nov 2014 14:34:24 -0800 Subject: [PATCH] Fix adb/fastboot windows compilations. Many of the windows files where not including stdlib.h even though they are using malloc/free calls. (cherry-pick of ae7bf0959bd3f79afbf365e41f015ed1c304afdc.) Change-Id: If6959df9909d9d9928e9f4a2a96018166361cf3c --- adb/adb_auth_host.c | 5 ++++- adb/sysdeps_win32.c | 1 + adb/usb_windows.c | 1 + fastboot/usb_windows.c | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/adb/adb_auth_host.c b/adb/adb_auth_host.c index 4c33d1474..a85919989 100644 --- a/adb/adb_auth_host.c +++ b/adb/adb_auth_host.c @@ -15,9 +15,12 @@ */ #include +#include #ifdef _WIN32 -# define WIN32_LEAN_AND_MEAN +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif # include "windows.h" # include "shlobj.h" #else diff --git a/adb/sysdeps_win32.c b/adb/sysdeps_win32.c index b082c6dba..e69ec2bbd 100644 --- a/adb/sysdeps_win32.c +++ b/adb/sysdeps_win32.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #define TRACE_TAG TRACE_SYSDEPS #include "adb.h" diff --git a/adb/usb_windows.c b/adb/usb_windows.c index b7ad913e8..a2d722604 100644 --- a/adb/usb_windows.c +++ b/adb/usb_windows.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "sysdeps.h" diff --git a/fastboot/usb_windows.c b/fastboot/usb_windows.c index 0d138635b..a09610f5c 100644 --- a/fastboot/usb_windows.c +++ b/fastboot/usb_windows.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "usb.h"