diff options
-rw-r--r-- | nptl/pthread_cond_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nptl/pthread_cond_init.c b/nptl/pthread_cond_init.c index 12a38fb492..73ae4321b0 100644 --- a/nptl/pthread_cond_init.c +++ b/nptl/pthread_cond_init.c @@ -31,7 +31,8 @@ __pthread_cond_init (cond, cond_attr) struct pthread_condattr *icond_attr = (struct pthread_condattr *) cond_attr; cond->__data.__lock = LLL_MUTEX_LOCK_INITIALIZER; - cond->__data.__clock = (icond_attr->value & 0xfe) >> 1; + cond->__data.__clock = (icond_attr == NULL + ? CLOCK_REALTIME : (icond_attr->value & 0xfe) >> 1); cond->__data.__total_seq = 0; cond->__data.__wakeup_seq = 0; cond->__data.__woken_seq = 0; |