Description of problem: Various #define and other symbols missing from pthread.h file (e.g. PTHREAD_PRIO_INHERIT, pthread_mutexattr_setprotocol etc.) Version-Release number of selected component (if applicable): 2.3.90-30 How reproducible: Always. Steps to Reproduce: 1. Compile APR 1.2.2. 2. Wait for it to break on missing stuff. Actual results: ----------------------------- locks/unix/proc_mutex.c:338: warning: implicit declaration of function 'pthread_mutexattr_setprotocol' locks/unix/proc_mutex.c:338: error: 'PTHREAD_PRIO_INHERIT' undeclared (first use in this function) ----------------------------- Expected results: This used to work (i.e. APR compilation didn't fail before). Additional info: The APR currently in Rawhide was delivered on 05 Jan 2006. This glibc-headers was delivered in Jan 10 2006. So, there is a good chance this problem wasn't yet encountered in Rawhide APR build.
That's apr bug, it mistakenly assumes that if robust mutexes are available, then POSIX priority inheritance extension is present as well, but that assumption is valid on Solaris, but not on Linux. Apr should just use the proper POSIXy way how to find out if priority inheritance is supported. Linux has: /* No support for priority inheritance or protection so far. */ #define _POSIX_THREAD_PRIO_INHERIT -1 #define _POSIX_THREAD_PRIO_PROTECT -1 which means the support is not present and the functions nor constants don't need to be provided in the headers.
*** This bug has been marked as a duplicate of 176911 ***
That is not an APR bug as stated by Jakub Jelinek. It is a misinterpretation by Linux of what the proper POSIXy way to do things is. These 2 symbols are POSIX feature test macros, not limit macros. They are either defined (to any value, including -1) if the feature is supported, or not defined if the feature is not supported. See for example section 2.9.3 page 53 in Std 1003.1 1996 edition of POSIX. In any case, Linux must have added these definitions, because it used to work. Bob Russell