Make arc4random_buf declaration available on NetBSD
Signed-off-by: gufe44 <gu981@protonmail.com>
diff --git a/tests/src/random.c b/tests/src/random.c
index 3345f78..78419c4 100644
--- a/tests/src/random.c
+++ b/tests/src/random.c
@@ -24,6 +24,15 @@
* This file is part of mbed TLS (https://tls.mbed.org)
*/
+/*
+ * for arc4random_buf() from <stdlib.h>
+ */
+#if defined(__NetBSD__)
+#define _NETBSD_SOURCE 1
+#elif defined(__OpenBSD__)
+#define _BSD_SOURCE 1
+#endif
+
#include <test/macros.h>
#include <test/random.h>
#include <string.h>