new conditional: HAVE_ARC4RANDOM_PUSH
This commit is contained in:
parent
569cf64ff1
commit
ab231f3595
10
sh.h
10
sh.h
|
@ -8,7 +8,7 @@
|
|||
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
|
||||
/* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */
|
||||
|
||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.26 2006/05/10 18:54:12 tg Exp $"
|
||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.27 2006/06/21 19:35:38 tg Exp $"
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
|
@ -1285,3 +1285,11 @@ extern void tty_close(void);
|
|||
#define HAVE_ARC4RANDOM 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ARC4RANDOM_PUSH
|
||||
#if defined(__MirBSD__) && (MirBSD >= 0x07AD)
|
||||
#define HAVE_ARC4RANDOM_PUSH 1
|
||||
#else
|
||||
#define HAVE_ARC4RANDOM_PUSH 0
|
||||
#endif
|
||||
#endif
|
||||
|
|
4
var.c
4
var.c
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.18 2006/05/26 22:17:21 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.19 2006/06/21 19:35:38 tg Exp $");
|
||||
|
||||
/*
|
||||
* Variables
|
||||
|
@ -997,7 +997,7 @@ setspec(struct tbl *vp)
|
|||
srand((unsigned int)intval(vp));
|
||||
#if HAVE_ARC4RANDOM
|
||||
use_rand = 1;
|
||||
#if defined(__MirBSD__) && (MirBSD >= 0x07AD)
|
||||
#if HAVE_ARC4RANDOM_PUSH
|
||||
arc4random_push((unsigned)vp ^ (unsigned)rand());
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue