1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 07:12:39 +00:00

windows support: fix compilation with pthreads

This caused errors like:

    core/mplayer.c:4308:5: error: implicit declaration of function 'pthread_win32_thread_detach_np' [-Werror=implicit-function-declaration]

It turns out a pthread.h include was missing. It's not clear why this
used to work (or rather, why it happens only sometimes). Possibly some
libraries or system headers recursively include pthread.h under certain
circumstances or configurations.

Fix missing quoting in configure, which led to broken terminal output.

Closes #6.
This commit is contained in:
wm4 2012-12-09 15:49:39 +01:00
parent ae9c03c1a9
commit 58f3b75485
2 changed files with 5 additions and 1 deletions

2
configure vendored
View File

@ -1490,7 +1490,7 @@ cc_check $_ld_tmp -DPTW32_STATIC_LIB && (tmp_run || test "$_ld_static") && _ld_p
fi
fi
if test "$_pthreads" = yes ; then
test $_ld_pthread && res_comment="using $_ld_pthread"
test "$_ld_pthread" && res_comment="using $_ld_pthread"
def_pthreads='#define HAVE_PTHREADS 1'
def_threads='#define HAVE_THREADS 1'
extra_cflags="$extra_cflags $THREAD_CFLAGS"

View File

@ -22,6 +22,10 @@
#include <math.h>
#include <assert.h>
#ifdef PTW32_STATIC_LIB
#include <pthread.h>
#endif
#include <libavutil/intreadwrite.h>
#include <libavutil/attributes.h>