[main] Respect the configure check for libevent_pthreads

This commit is contained in:
ejurgensen 2017-07-22 00:04:35 +02:00
parent 935d1549d4
commit b19553811c

View File

@ -46,7 +46,9 @@
#include <getopt.h> #include <getopt.h>
#include <event2/event.h> #include <event2/event.h>
#include <event2/thread.h> #ifdef HAVE_LIBEVENT_PTHREADS
# include <event2/thread.h>
#endif
#include <libavutil/log.h> #include <libavutil/log.h>
#include <libavformat/avformat.h> #include <libavformat/avformat.h>
#include <libavfilter/avfilter.h> #include <libavfilter/avfilter.h>
@ -689,7 +691,7 @@ main(int argc, char **argv)
/* Initialize event base (after forking) */ /* Initialize event base (after forking) */
CHECK_NULL(L_MAIN, evbase_main = event_base_new()); CHECK_NULL(L_MAIN, evbase_main = event_base_new());
#ifdef SPOTIFY #ifdef HAVE_LIBEVENT_PTHREADS
CHECK_ERR(L_MAIN, evthread_use_pthreads()); CHECK_ERR(L_MAIN, evthread_use_pthreads());
#endif #endif