summaryrefslogtreecommitdiffstats
path: root/adb/Android.mk
diff options
context:
space:
mode:
Diffstat (limited to 'adb/Android.mk')
-rw-r--r--adb/Android.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/adb/Android.mk b/adb/Android.mk
index 46905b335..e2d0bb1b1 100644
--- a/adb/Android.mk
+++ b/adb/Android.mk
@@ -22,6 +22,15 @@ ADB_COMMON_CFLAGS := \
-Wno-missing-field-initializers \
-DADB_REVISION='"$(adb_version)"' \
+# Define windows.h and tchar.h Unicode preprocessor symbols so that
+# CreateFile(), _tfopen(), etc. map to versions that take wchar_t*, breaking the
+# build if you accidentally pass char*. Fix by calling like:
+# CreateFileW(widen(utf8).c_str()).
+ADB_COMMON_windows_CFLAGS := \
+ -DUNICODE=1 -D_UNICODE=1 \
+
+ADB_COMMON_CFLAGS += $(ADB_COMMON_$(HOST_OS)_CFLAGS)
+
# libadb
# =========================================================