Fix warnings on mingw build

This commit is contained in:
Helenerineium 2019-11-23 17:47:44 +08:00
parent ed154b9052
commit 288f04eb17
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ endif()
#Fixes GetActiveProcessorCount on MinGW
if(MINGW)
target_compile_definitions(libninja PRIVATE _WIN32_WINNT=0x0601)
target_compile_definitions(libninja PRIVATE _WIN32_WINNT=0x0601 __USE_MINGW_ANSI_STDIO=1)
endif()
# Main executable is library plus main() function.

View File

@ -356,7 +356,7 @@ else:
except:
pass
if platform.is_mingw():
cflags += ['-D_WIN32_WINNT=0x0601']
cflags += ['-D_WIN32_WINNT=0x0601', '-D__USE_MINGW_ANSI_STDIO=1']
ldflags = ['-L$builddir']
if platform.uses_usr_local():
cflags.append('-I/usr/local/include')