public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* Help with issues on trying to compile ffmpeg with pthreads support
@ 2008-08-19  3:17 Pardeep Puar
  2008-08-21  1:07 ` Ross Johnson
  0 siblings, 1 reply; 2+ messages in thread
From: Pardeep Puar @ 2008-08-19  3:17 UTC (permalink / raw)
  To: pthreads-win32

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Help with issues on trying to compile ffmpeg with pthreads support
  2008-08-19  3:17 Help with issues on trying to compile ffmpeg with pthreads support Pardeep Puar
@ 2008-08-21  1:07 ` Ross Johnson
  0 siblings, 0 replies; 2+ messages in thread
From: Ross Johnson @ 2008-08-21  1:07 UTC (permalink / raw)
  To: Pardeep Puar; +Cc: pthreads-win32

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
>   

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-21  1:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-19  3:17 Help with issues on trying to compile ffmpeg with pthreads support Pardeep Puar
2008-08-21  1:07 ` Ross Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).