diff --git a/src/libCom/osi/os/posix/osdMutex.c b/src/libCom/osi/os/posix/osdMutex.c index 08eda1002..128558368 100644 --- a/src/libCom/osi/os/posix/osdMutex.c +++ b/src/libCom/osi/os/posix/osdMutex.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -66,22 +65,24 @@ static void setAttrDefaults(pthread_mutexattr_t *a) status = pthread_mutexattr_init(a); checkStatusQuit(status,"pthread_mutexattr_init","setAttrDefaults"); -#if defined _POSIX_THREAD_PRIO_INHERIT { const char *p = envGetConfigParamPtr(&EPICS_MUTEX_USE_PRIORITY_INHERITANCE); char c = p ? toupper(p[0]) : 'N'; if ( 'T' == c || 'Y' == c || '1' == c ) { +#if defined _POSIX_THREAD_PRIO_INHERIT status = pthread_mutexattr_setprotocol(a, PTHREAD_PRIO_INHERIT); if (errVerbose) checkStatus(status, "pthread_mutexattr_setprotocol(PTHREAD_PRIO_INHERIT)"); #ifndef HAVE_RECURSIVE_MUTEX /* The implementation based on a condition variable below does not support * priority-inheritance! */ - epicsPrintf("WARNING: PRIORITY-INHERITANCE UNAVAILABLE for epicsMutex\n"); + fprintf(stderr,"WARNING: PRIORITY-INHERITANCE UNAVAILABLE for epicsMutex\n"); +#endif +#else + fprintf(stderr,"WARNING: PRIORITY-INHERITANCE UNAVAILABLE OR NOT COMPILED IN\n"); #endif } } -#endif }