RPM Community Forums

Mailing List Message of <rpm-devel>

Re: compile error in psm.c (missing pthread.h include?) on qnx

From: Peter Kalbus <peter.kalbus@gmx.de>
Date: Fri 25 Jan 2008 - 18:10:43 CET
Message-ID: <20080125171043.120520@gmx.net>
great.

can i help in any way in getting that point fixed?

-piet

-------- Original-Nachricht --------
> Datum: Fri, 25 Jan 2008 11:12:43 -0500
> Von: Jeff Johnson <n3npq@mac.com>
> An: rpm-devel@rpm5.org
> Betreff: Re: compile error in psm.c (missing pthread.h include?) on qnx

> This needs to be done in psm.c, not in rpmsq.c.
> 
> rpmsq.h ends up in /usr/include/rpm, and applications should
> not be forced to define HAVE_PTHREAD_H in order
> to include rpmsq.h.
> 
> The better fix is to find every place in rpm code that rpmsq.h is  
> included,
> and insure that pthread.h is included first. I'll attempt that
> fix, but I cannot test because no QNX here.
> 
> Yes, that also means that applications will have to do their own
>     #include <pthread.h>
> but that's life.
> 
> Better than forcing applications to define HAVE_PTHREAD_H imho.
> 
> 73 de Jeff
> 
> On Jan 24, 2008, at 6:21 PM, Peter Kalbus wrote:
> 
> > psm.c is currently not compilable under qnx 6.3.2:
> >
> >  qcc -DHAVE_CONFIG_H -I. -I.. -I../build -I../lib -I../rpmdb -I../ 
> > rpmio -I../misc -I../db3 -I../file/src -I../file -I/usr/pkg/svn/ 
> > HEAD/pkgsrc/misc/rpm5/work/.buildlink/include - 
> > DRPM_OS_NTOQNX=060400 -O2 -D_GNU_SOURCE -D_REENTRANT -MT psm.lo -MD  
> > -MP -MF .deps/psm.Tpo -c psm.c  -fPIC -DPIC -o .libs/psm.o
> > In file included from psm.h:9,
> >                  from psm.c:20:
> > ../rpmio/rpmsq.h:50: error: parse error before "pthread_mutex_t"
> > ../rpmio/rpmsq.h:50: warning: no semicolon at end of struct or union
> > ../rpmio/rpmsq.h:51: warning: data definition has no type or  
> > storage class
> > In file included from psm.c:20:
> > psm.h:65: error: field `sq' has incomplete type
> >
> > if i include pthread.h in rpmsq.h, every works fine. i guess, that  
> > the chance is valid for every os, although, i've not cross checked  
> > that.
> >
> > <patch-av>
> >
> >
> > -piet
> >
> 
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> Developer Communication List                        rpm-devel@rpm5.org
Received on Fri Jan 25 18:10:44 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.