summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/netbsd-tests/lib/libc/string/t_memcpy.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libc/string/t_memcpy.c b/contrib/netbsd-tests/lib/libc/string/t_memcpy.c
index 6485a88..c9e52a3 100644
--- a/contrib/netbsd-tests/lib/libc/string/t_memcpy.c
+++ b/contrib/netbsd-tests/lib/libc/string/t_memcpy.c
@@ -51,7 +51,11 @@ unsigned char *start[BLOCKTYPES] = {
};
char result[100];
+#if defined(__NetBSD__)
const char goodResult[] = "7b405d24bc03195474c70ddae9e1f8fb";
+#else
+const char goodResult[] = "217b4fbe456916bf62a2f85df752e4ab";
+#endif
static void
runTest(unsigned char *b1, unsigned char *b2)
@@ -89,7 +93,15 @@ ATF_TC_BODY(memcpy_basic, tc)
start[2] = auto1;
start[3] = auto2;
+#if defined(__NetBSD__)
srandom(0L);
+#else
+ /*
+ * random() shall produce by default a sequence of numbers that can be
+ * duplicated by calling srandom() with 1 as the seed.
+ */
+ srandom(1);
+#endif
MD5Init(mc);
for (i = 0; i < BLOCKTYPES; ++i)
for (j = 0; j < BLOCKTYPES; ++j)
OpenPOWER on IntegriCloud