diff options
author | Christopher Wiley <wiley@google.com> | 2015-12-30 12:24:40 -0800 |
---|---|---|
committer | Christopher Wiley <wiley@google.com> | 2015-12-30 12:30:58 -0800 |
commit | 676799f23d935b64873ccf5b1bf9b475cb392ea3 (patch) | |
tree | c3a02c47e40dc0a8e7bf07f1f04874c41ae03c2f | |
parent | 530d99446a02912387ea45c1d1d35a7d1bd39829 (diff) | |
download | build-676799f23d935b64873ccf5b1bf9b475cb392ea3.tar.gz |
Fix compiler warnings on Windows in CopyFile.c
direct.h declares _mkdir() on Windows.
Prevent future compiler warnings with -Wall and -Werror.
Bug: 26355209
Test: `mmma -j30 build/libs/host` for aosp_arm64-eng is successful.
Change-Id: I6d6e4edca98bef57d62829e9d1ef4e2a96cdad3d
-rw-r--r-- | libs/host/Android.mk | 1 | ||||
-rw-r--r-- | libs/host/CopyFile.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/libs/host/Android.mk b/libs/host/Android.mk index 7eb3aa14dd..8a28457d35 100644 --- a/libs/host/Android.mk +++ b/libs/host/Android.mk @@ -4,6 +4,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ CopyFile.c +LOCAL_CFLAGS := -Werror -Wall LOCAL_CFLAGS_darwin += -DMACOSX_RSRC LOCAL_MODULE:= libhost diff --git a/libs/host/CopyFile.c b/libs/host/CopyFile.c index 1d9b6bd8e8..d785dca83a 100644 --- a/libs/host/CopyFile.c +++ b/libs/host/CopyFile.c @@ -25,6 +25,7 @@ #include <assert.h> #if defined(_WIN32) +#include <direct.h> /* For _mkdir() */ # define mkdir(path,mode) _mkdir(path) # define S_ISLNK(s) 0 # define lstat stat |