summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/rand/randfile.c
diff options
context:
space:
mode:
authorsimon <simon@FreeBSD.org>2006-07-29 19:10:21 +0000
committersimon <simon@FreeBSD.org>2006-07-29 19:10:21 +0000
commitfb3c70eda88d3175627edc6a3316b4508b3d29c5 (patch)
tree213a0c4d5ba3869f66ecf970819532048fed4a9d /crypto/openssl/crypto/rand/randfile.c
parent3c8d7d9993705e30bc69e55cd19d8a298e582292 (diff)
downloadFreeBSD-src-fb3c70eda88d3175627edc6a3316b4508b3d29c5.zip
FreeBSD-src-fb3c70eda88d3175627edc6a3316b4508b3d29c5.tar.gz
Vendor import of OpenSSL 0.9.8b
Diffstat (limited to 'crypto/openssl/crypto/rand/randfile.c')
-rw-r--r--crypto/openssl/crypto/rand/randfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/openssl/crypto/rand/randfile.c b/crypto/openssl/crypto/rand/randfile.c
index c7fba49..d69bdf8 100644
--- a/crypto/openssl/crypto/rand/randfile.c
+++ b/crypto/openssl/crypto/rand/randfile.c
@@ -57,7 +57,7 @@
*/
/* We need to define this to get macros like S_IFBLK and S_IFCHR */
-#define _XOPEN_SOURCE 1
+#define _XOPEN_SOURCE 500
#include <errno.h>
#include <stdio.h>
@@ -104,7 +104,7 @@ int RAND_load_file(const char *file, long bytes)
i=stat(file,&sb);
/* If the state fails, put some crap in anyway */
- RAND_add(&sb,sizeof(sb),0);
+ RAND_add(&sb,sizeof(sb),0.0);
if (i < 0) return(0);
if (bytes == 0) return(ret);
@@ -129,7 +129,7 @@ int RAND_load_file(const char *file, long bytes)
i=fread(buf,1,n,in);
if (i <= 0) break;
/* even if n != i, use the full array */
- RAND_add(buf,n,i);
+ RAND_add(buf,n,(double)i);
ret+=i;
if (bytes > 0)
{
OpenPOWER on IntegriCloud