aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/random.c')
-rw-r--r--cipher/random.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cipher/random.c b/cipher/random.c
index be23ddd3e..02fc2ba3a 100644
--- a/cipher/random.c
+++ b/cipher/random.c
@@ -594,8 +594,11 @@ fast_random_poll()
#endif
#else
{ struct rusage buf;
- if( getrusage( RUSAGE_SELF, &buf ) )
+ /* QNX/Neutrino does return ENOSYS - so we just ignore it and
+ * add whatever is in buf */
+ if( getrusage( RUSAGE_SELF, &buf ) && errno != ENOSYS )
BUG();
+
add_randomness( &buf, sizeof buf, 1 );
memset( &buf, 0, sizeof buf );
}