summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2019-03-29 03:04:20 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2019-03-29 03:04:20 +0000
commit3dc290e5cfa30658987ff88e9dc5209e3984baeb (patch)
treeb8578afd5cb6ba620655e6407153df4ea6a5f930 /regress
parent63dce4e69bc7225c3367063b4db5b2a67163c67f (diff)
Fix a compiler warning. Also use srandom_deterministic(3) since using
random(3) intentionally is to repeat the test failure if it happens.
Diffstat (limited to 'regress')
-rw-r--r--regress/lib/libradius/incs.h1
-rw-r--r--regress/lib/libradius/main.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/regress/lib/libradius/incs.h b/regress/lib/libradius/incs.h
index 01a9b9e83bb..a11628960de 100644
--- a/regress/lib/libradius/incs.h
+++ b/regress/lib/libradius/incs.h
@@ -7,6 +7,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <unistd.h>
#include <radius.h>
diff --git a/regress/lib/libradius/main.c b/regress/lib/libradius/main.c
index 3a35ff63e62..a3968c70f81 100644
--- a/regress/lib/libradius/main.c
+++ b/regress/lib/libradius/main.c
@@ -18,7 +18,7 @@ int test_entry_cmp(const void *a, const void *b)
int main(void)
{
- srandom(time(NULL));
+ srandom_deterministic(time(NULL));
qsort(entries, ntests, sizeof(struct test_entry), test_entry_cmp);