diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2020-05-21 05:01:52 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2020-05-21 05:01:52 +0000 |
| commit | 6a53c00e64c4cf911eb00846733d9e6a47b2e7f4 (patch) | |
| tree | 60a7720d2d4edfe62b094e2665743e8879ebb911 /util/random.c | |
| parent | e2fe726866d062155f6b1aae749375475ef19191 (diff) | |
Diffstat (limited to 'util/random.c')
| -rw-r--r-- | util/random.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/random.c b/util/random.c index bb564f2f99aa..6eb102c634b9 100644 --- a/util/random.c +++ b/util/random.c @@ -78,7 +78,7 @@ */ #define MAX_VALUE 0x7fffffff -#if defined(HAVE_SSL) +#if defined(HAVE_SSL) || defined(HAVE_LIBBSD) struct ub_randstate* ub_initstate(struct ub_randstate* ATTR_UNUSED(from)) { @@ -183,10 +183,10 @@ long int ub_random(struct ub_randstate* s) } return x & MAX_VALUE; } -#endif /* HAVE_SSL or HAVE_NSS or HAVE_NETTLE */ +#endif /* HAVE_SSL or HAVE_LIBBSD or HAVE_NSS or HAVE_NETTLE */ -#if defined(HAVE_NSS) || defined(HAVE_NETTLE) +#if defined(HAVE_NSS) || defined(HAVE_NETTLE) && !defined(HAVE_LIBBSD) long int ub_random_max(struct ub_randstate* state, long int x) { @@ -198,7 +198,7 @@ ub_random_max(struct ub_randstate* state, long int x) v = ub_random(state); return (v % x); } -#endif /* HAVE_NSS or HAVE_NETTLE */ +#endif /* HAVE_NSS or HAVE_NETTLE and !HAVE_LIBBSD */ void ub_randfree(struct ub_randstate* s) |
