summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2014-11-06 14:34:24 -0800
committerChristopher Ferris <cferris@google.com>2014-11-06 18:32:39 -0800
commit0eabf64ce0c649e4ef691ae1b70cb20d599dd429 (patch)
tree25bbdbcbfb28af0855bec96baca3573a9b222c1c
parentac12f25004d728fe117c058446fccb0ca0a397c9 (diff)
downloadsystem_core-0eabf64ce0c649e4ef691ae1b70cb20d599dd429.zip
system_core-0eabf64ce0c649e4ef691ae1b70cb20d599dd429.tar.gz
system_core-0eabf64ce0c649e4ef691ae1b70cb20d599dd429.tar.bz2
Fix adb/fastboot windows compilations.
Many of the windows files where not including stdlib.h even though they are using malloc/free calls. Bug: 18283958 (cherry picked from commit ae7bf0959bd3f79afbf365e41f015ed1c304afdc) Change-Id: Iebc09cc314fa8f0ba6c6cd45ba26135052f156dd
-rw-r--r--adb/adb_auth_host.c5
-rw-r--r--adb/sysdeps_win32.c1
-rwxr-xr-xadb/usb_vendors.c5
-rw-r--r--adb/usb_windows.c1
-rw-r--r--fastboot/usb_windows.c1
5 files changed, 11 insertions, 2 deletions
diff --git a/adb/adb_auth_host.c b/adb/adb_auth_host.c
index 783774a..8e444a8 100644
--- a/adb/adb_auth_host.c
+++ b/adb/adb_auth_host.c
@@ -15,9 +15,12 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#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 b082c6d..e69ec2b 100644
--- a/adb/sysdeps_win32.c
+++ b/adb/sysdeps_win32.c
@@ -2,6 +2,7 @@
#include <winsock2.h>
#include <windows.h>
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#define TRACE_TAG TRACE_SYSDEPS
#include "adb.h"
diff --git a/adb/usb_vendors.c b/adb/usb_vendors.c
index 957e5db..19bcae4 100755
--- a/adb/usb_vendors.c
+++ b/adb/usb_vendors.c
@@ -17,9 +17,12 @@
#include "usb_vendors.h"
#include <stdio.h>
+#include <stdlib.h>
#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 b7ad913..a2d7226 100644
--- a/adb/usb_windows.c
+++ b/adb/usb_windows.c
@@ -21,6 +21,7 @@
#include <usb100.h>
#include <adb_api.h>
#include <stdio.h>
+#include <stdlib.h>
#include "sysdeps.h"
diff --git a/fastboot/usb_windows.c b/fastboot/usb_windows.c
index 0d13863..a09610f 100644
--- a/fastboot/usb_windows.c
+++ b/fastboot/usb_windows.c
@@ -32,6 +32,7 @@
#include <usb100.h>
#include <adb_api.h>
#include <stdio.h>
+#include <stdlib.h>
#include "usb.h"