This is the mail archive of the pthreads-win32@sourceware.org mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help with issues on trying to compile ffmpeg with pthreads support


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]