This is the mail archive of the
pthreads-win32@sourceware.org
mailing list for the pthreas-win32 project.
Re: Help with issues on trying to compile ffmpeg with pthreads support
- From: Ross Johnson <Ross dot Johnson at homemail dot com dot au>
- To: Pardeep Puar <ppuar at fragrance-world dot net>
- Cc: pthreads-win32 at sourceware dot org
- Date: Thu, 21 Aug 2008 11:07:00 +1000
- Subject: Re: Help with issues on trying to compile ffmpeg with pthreads support
- References: <D3E1CB413C1D4F4DB4A2E4E924B93EDC2586C2@batman.kingsingh.com>
I would guess that pid_t isn't defined.
In sched.h line 116 you'll find:-
#if defined(__MINGW32__) || defined(_UWIN)
#if PTW32_LEVEL >= PTW32_LEVEL_MAX
/* For pid_t */
# include <sys/types.h>
/* Required by Unix 98 */
# include <time.h>
#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */
#else
typedef int pid_t;
#endif
PTW32_LEVEL is defined in pthread.h and is generally equal to
PTW32_LEVEL_MAX (also defined in pthread.h), otherwise pid_t will not be
defined, which is a bug. Could you try changing this to:
#if defined(__MINGW32__) || defined(_UWIN)
#if PTW32_LEVEL >= PTW32_LEVEL_MAX
/* For pid_t */
# include <sys/types.h>
/* Required by Unix 98 */
# include <time.h>
#else
typedef int pid_t;
#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */
#else
typedef int pid_t;
#endif
Check also that pid_t is defined in sys/types.h.
Ross
Pardeep Puar wrote:
Here is the configure command I am using:
./configure --prefix=/c/dev/ffmpeg-build-shared --enable-memalign-hack
--enable-pthreads --disable-network --enable-shared --disable-static
Here is the error message I am getting:
In file included from
c:\msys\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/pthr
ead.h:288,
from libavcodec/pthread.c:24:
c:\msys\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/sche
d.h:152: error: expected ')' before 'pid'
c:\msys\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/sche
d.h:154: error: expected ')' before 'pid'
make: *** [libavcodec/pthread.o] Error 1
Is there a problem with using pthreads with ffmpeg?
Thanks
Pardeep