Description of problem:
rpmsq.c uses mutexs to manage the child processes. These mutexes are defined
using default parameters. RPM expects that PTHREAD_MUTEX_DEFAULT will have the
effects of PTHREAD_MUTEX_NORMAL. POSIX 1003.1-2004 states that
PTHREAD_MUTEX_DEFAULT may be set to any standard POSIX mutex type, not
necessarily NORMAL. This can lead to many unexpected problems, especially when
porting RPM to new OSes.
Version-Release number of selected component (if applicable):
My suggestion is to add a simple:
#if PTHREAD_MUTEX_DEFAULT != PTHREAD_MUTEX_NORMAL
#error RPM Expected PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL
to the rpmio/rpmsq.c to help prevent future porting issues.. or if the defaults
ever change in an existing port.
Added to rpm-4_4 cvs, should be in rpm-4.4.2-0.8 when built. Thanks for the suggestion.