diff options
author | wm4 <wm4@mplayer2.org> | 2012-01-31 08:31:04 +0100 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2012-03-01 00:22:29 +0200 |
commit | eebe9309ecd70f86f0a52f09712db833df589206 (patch) | |
tree | e7c41b0a5f2f6df9b2d5c7acd74c44c9d390dbf5 | |
parent | 3dbb18d91a0d4b17f0187e3b5faa3b6f3cd1b31e (diff) | |
download | mpv-eebe9309ecd70f86f0a52f09712db833df589206.tar.bz2 mpv-eebe9309ecd70f86f0a52f09712db833df589206.tar.xz |
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.)
-rwxr-xr-x | configure | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 |