diff options
Diffstat (limited to '')
-rw-r--r-- | shell/random.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/shell/random.c b/shell/random.c index 56c7c5a3c..ffe0cc937 100644 --- a/shell/random.c +++ b/shell/random.c | |||
@@ -19,6 +19,17 @@ | |||
19 | # include "random.h" | 19 | # include "random.h" |
20 | # define RAND_BASH_MASK 0x7fff | 20 | # define RAND_BASH_MASK 0x7fff |
21 | 21 | ||
22 | # if ENABLE_FEATURE_PRNG_SHELL | ||
23 | uint32_t FAST_FUNC | ||
24 | next_random(random_t *rnd) | ||
25 | { | ||
26 | return full_random(rnd) & RAND_BASH_MASK; | ||
27 | } | ||
28 | # undef RAND_BASH_MASK | ||
29 | # define RAND_BASH_MASK 0xffffffff | ||
30 | # define next_random full_random | ||
31 | # endif | ||
32 | |||
22 | #else | 33 | #else |
23 | # include <stdint.h> | 34 | # include <stdint.h> |
24 | # include <unistd.h> | 35 | # include <unistd.h> |