From ae7bf0959bd3f79afbf365e41f015ed1c304afdc 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. Change-Id: If6959df9909d9d9928e9f4a2a96018166361cf3c --- adb/adb_auth_host.c | 5 ++++- adb/sysdeps_win32.c | 1 + adb/usb_vendors.c | 5 ++++- adb/usb_windows.c | 1 + fastboot/usb_windows.c | 1 + 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/adb/adb_auth_host.c b/adb/adb_auth_host.c index c72fe4208..e53f05926 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_vendors.c b/adb/usb_vendors.c index b0372686e..b6e43d540 100755 --- a/adb/usb_vendors.c +++ b/adb/usb_vendors.c @@ -17,9 +17,12 @@ #include "usb_vendors.h" #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/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"