summaryrefslogtreecommitdiff
path: root/pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'pthread.h')
-rw-r--r--pthread.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/pthread.h b/pthread.h
index e40aaef..176892b 100644
--- a/pthread.h
+++ b/pthread.h
@@ -887,8 +887,9 @@ int * _errno( void );
( *(_result) = *localtime( (_clock) ), \
(_result) )
+/* The redundant test avoids unused variable warnings */
#define rand_r( _seed ) \
- rand()
+ ((seed == seed) ? rand() : rand())
#ifdef __cplusplus