diff options
Diffstat (limited to 'entropy.c')
-rw-r--r-- | entropy.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -40,7 +40,7 @@ | |||
40 | #include "pathnames.h" | 40 | #include "pathnames.h" |
41 | #include "log.h" | 41 | #include "log.h" |
42 | 42 | ||
43 | RCSID("$Id: entropy.c,v 1.37 2001/06/27 13:36:08 djm Exp $"); | 43 | RCSID("$Id: entropy.c,v 1.38 2001/08/06 06:51:49 djm Exp $"); |
44 | 44 | ||
45 | #ifndef offsetof | 45 | #ifndef offsetof |
46 | # define offsetof(type, member) ((size_t) &((type *)0)->member) | 46 | # define offsetof(type, member) ((size_t) &((type *)0)->member) |
@@ -505,7 +505,9 @@ hash_output_from_command(entropy_source_t *src, char *hash) | |||
505 | break; | 505 | break; |
506 | case 1: | 506 | case 1: |
507 | /* command input */ | 507 | /* command input */ |
508 | bytes_read = read(p[0], buf, sizeof(buf)); | 508 | do { |
509 | bytes_read = read(p[0], buf, sizeof(buf)); | ||
510 | } while (bytes_read == -1 && errno == EINTR); | ||
509 | RAND_add(&bytes_read, sizeof(&bytes_read), 0.0); | 511 | RAND_add(&bytes_read, sizeof(&bytes_read), 0.0); |
510 | if (bytes_read == -1) { | 512 | if (bytes_read == -1) { |
511 | error_abort = 1; | 513 | error_abort = 1; |