public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: Ross Johnson <Ross.Johnson@homemail.com.au>
To: Pardeep Puar <ppuar@fragrance-world.net>
Cc: pthreads-win32@sourceware.org
Subject: Re: Help with issues on trying to compile ffmpeg with pthreads support
Date: Thu, 21 Aug 2008 01:07:00 -0000	[thread overview]
Message-ID: <48ACBFB4.3050808@homemail.com.au> (raw)
In-Reply-To: <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
>   

      reply	other threads:[~2008-08-21  1:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-19  3:17 Pardeep Puar
2008-08-21  1:07 ` Ross Johnson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48ACBFB4.3050808@homemail.com.au \
    --to=ross.johnson@homemail.com.au \
    --cc=ppuar@fragrance-world.net \
    --cc=pthreads-win32@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).