From 2f431a8d5a1c2029af470a7336751a555131ee51 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Wed, 1 Oct 2014 17:37:06 -0700 Subject: [PATCH] Fix windows-specific error without messing up Makefile flags. Bug: 14416410 The proper fix for the error/warning we encountered is to move winsock2.h in front of windows.h. Change-Id: I29504ba3a184a85c6636d06c2ad900828fdb5436 --- adb/Android.mk | 3 --- adb/sysdeps.h | 2 +- adb/sysdeps_win32.c | 2 +- adb/usb_windows.c | 1 + 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/adb/Android.mk b/adb/Android.mk index 138e747b2..af7d7e58b 100644 --- a/adb/Android.mk +++ b/adb/Android.mk @@ -73,9 +73,6 @@ else endif LOCAL_CFLAGS += -O2 -g -DADB_HOST=1 -Wall -Wno-unused-parameter -Werror -ifeq ($(HOST_OS),windows) -LOCAL_CFLAGS += -Wno-error=cpp -endif LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE LOCAL_MODULE := adb LOCAL_MODULE_TAGS := debug diff --git a/adb/sysdeps.h b/adb/sysdeps.h index ac9415cd0..cc1f839e9 100644 --- a/adb/sysdeps.h +++ b/adb/sysdeps.h @@ -26,8 +26,8 @@ #ifdef _WIN32 -#include #include +#include #include #include #include diff --git a/adb/sysdeps_win32.c b/adb/sysdeps_win32.c index 19043252e..b082c6dba 100644 --- a/adb/sysdeps_win32.c +++ b/adb/sysdeps_win32.c @@ -1,6 +1,6 @@ #include "sysdeps.h" -#include #include +#include #include #include #define TRACE_TAG TRACE_SYSDEPS diff --git a/adb/usb_windows.c b/adb/usb_windows.c index 1309a78cf..b7ad913e8 100644 --- a/adb/usb_windows.c +++ b/adb/usb_windows.c @@ -14,6 +14,7 @@ * limitations under the License. */ +#include #include #include #include