blob: 2d29ca95a0ac76cdd7b0686a48935c1a27df08ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
$NetBSD: patch-ai,v 1.2 2008/01/06 17:17:15 rillig Exp $
Conflicts with system function (size_t datlen) on DragonFly.
--- libbsd/arc4random.c.orig 2006-05-06 14:33:22.000000000 +0000
+++ libbsd/arc4random.c 2008-01-06 18:14:32.000000000 +0000
@@ -41,7 +41,9 @@
#include <sys/time.h>
#include <sys/sysctl.h>
-#define KERN_ARND 37
+#ifndef KERN_ARND
+#define KERN_ARND 37 /* XXX: Different (81) on NetBSD */
+#endif
#ifdef __GNUC__
#define inline __inline
@@ -150,14 +152,6 @@ arc4random_stir(void)
arc4_stir(&rs);
}
-void
-arc4random_addrandom(u_char *dat, int datlen)
-{
- if (!rs_initialized)
- arc4random_stir();
- arc4_addrandom(&rs, dat, datlen);
-}
-
u_int32_t
arc4random(void)
{
|