diff options
Diffstat (limited to 'cipher/random.c')
-rw-r--r-- | cipher/random.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cipher/random.c b/cipher/random.c index e93a0bdd7..198663536 100644 --- a/cipher/random.c +++ b/cipher/random.c @@ -604,9 +604,11 @@ fast_random_poll() #else { struct rusage 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 whatever is in buf. In a chroot environment it might not + * work at all (i.e. because /proc/ is not accessible), so we better + * ognore all error codes and hope for the best + */ + getrusage( RUSAGE_SELF, &buf ); add_randomness( &buf, sizeof buf, 1 ); memset( &buf, 0, sizeof buf ); |