Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/sys/sys Use cprgn_fast() not rnd_extract...



details:   https://anonhg.NetBSD.org/src/rev/4885939cad36
branches:  trunk
changeset: 783680:4885939cad36
user:      dsl <dsl%NetBSD.org@localhost>
date:      Thu Jan 03 16:42:55 2013 +0000

description:
Use cprgn_fast() not rnd_extract_data().
The latter isn't in any header files any more.

diffstat:

 external/cddl/osnet/sys/sys/random.h |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (22 lines):

diff -r b690ece67819 -r 4885939cad36 external/cddl/osnet/sys/sys/random.h
--- a/external/cddl/osnet/sys/sys/random.h      Thu Jan 03 16:41:51 2013 +0000
+++ b/external/cddl/osnet/sys/sys/random.h      Thu Jan 03 16:42:55 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: random.h,v 1.3 2010/02/21 01:46:36 darran Exp $        */
+/*     $NetBSD: random.h,v 1.4 2013/01/03 16:42:55 dsl Exp $   */
 
 /*-
  * Copyright (c) 2007 Pawel Jakub Dawidek <pjd%FreeBSD.org@localhost>
@@ -31,9 +31,9 @@
 #ifndef _OPENSOLARIS_SYS_RANDOM_H_
 #define        _OPENSOLARIS_SYS_RANDOM_H_
 
-#include <sys/rnd.h>
+#include <sys/cprng.h>
 
-#define        random_get_bytes(p, s)          rnd_extract_data((p), (uint32_t)(s), 0)
-#define        random_get_pseudo_bytes(p, s)   rnd_extract_data((p), (uint32_t)(s), 0)
+#define        random_get_bytes(p, s)          cprgn_fast(p, s)
+#define        random_get_pseudo_bytes(p, s)   cprgn_fast(p, s)
 
 #endif /* !_OPENSOLARIS_SYS_RANDOM_H_ */



Home | Main Index | Thread Index | Old Index