1
mirror of https://github.com/mpv-player/mpv synced 2024-08-04 14:59:58 +02:00

configure: add __USE_MINGW_ANSI_STDIO on MinGW

This makes MinGW redirect certain stdio functions (such as the sprintf
family) from the MSVCRT libc to a standard compliant MinGW
implementation.

This fixes a crash in talloc.c when compiling mplayer with MinGW-w64.
The problem is most likely with talloc_vasprintf(), which calls
vsnprintf with a small buffer and checks its return value to find out
how much space the formatted string requires. Without this commit,
vsnprintf would always return -1, and then the code calls abort().
(lachs0r figured out this one.)
This commit is contained in:
wm4 2012-01-31 08:31:04 +01:00 committed by Uoti Urpala
parent 3dbb18d91a
commit eebe9309ec

1
configure vendored
View File

@ -1397,6 +1397,7 @@ fi
if mingw32 ; then
_getch=getch2-win.c
need_shmem=no
extra_cflags="$extra_cflags -D__USE_MINGW_ANSI_STDIO=1"
fi
if amigaos ; then