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
This commit is contained in:
Christopher Wiley
2015-12-30 12:24:40 -08:00
parent 530d99446a
commit 676799f23d
2 changed files with 2 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
CopyFile.c
LOCAL_CFLAGS := -Werror -Wall
LOCAL_CFLAGS_darwin += -DMACOSX_RSRC
LOCAL_MODULE:= libhost

View File

@@ -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