# HG changeset patch # User reimar # Date 1379781564 0 # Node ID d53606fdb6931da9ecbbddd89bf734b8a7ef6ed6 # Parent 7dca7d4d4e547f2d2b24ce62523968e3b3bef9c0 Autodetect if pthread_cancel is available. Necessary for properly working reception of streams via UDP, e.g. via FFmpeg's RTSP-over-UDP implementation. diff -r 7dca7d4d4e54 -r d53606fdb693 configure --- a/configure Sat Sep 21 15:55:28 2013 +0000 +++ b/configure Sat Sep 21 16:39:24 2013 +0000 @@ -3843,6 +3843,22 @@ fi echores "$_pthreads" +pthread_cancel=no +if test "$_pthreads" = yes ; then + echocheck "pthread_cancel" +cat > $TMPC << EOF +#include +int main(void) { pthread_t t; return pthread_cancel(t); } +EOF + cc_check $ld_pthread && pthread_cancel=yes + echores "$pthread_cancel" +fi +if test "$pthread_cancel" = yes ; then + def_pthread_cancel='#define HAVE_PTHREAD_CANCEL 1' +else + def_pthread_cancel='#define HAVE_PTHREAD_CANCEL 0' +fi + if cygwin ; then if test "$_pthreads" = yes ; then def_pthread_cache="#define PTHREAD_CACHE 1" @@ -9038,6 +9054,7 @@ $def_os2threads $def_pic $def_pthreads +$def_pthread_cancel $def_socklen_t $def_struct_addrinfo $def_struct_ipv6_mreq @@ -9124,7 +9141,6 @@ #define HAVE_MIPSDSPR1 0 #define HAVE_MIPSFPU 0 #define HAVE_MM_EMPTY 0 -#define HAVE_PTHREAD_CANCEL 0 #define HAVE_PPC4XX 0 #define HAVE_RDTSC 0 #define HAVE_STRERROR_R 0