summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--freebsd/sys/sys/random.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/freebsd/sys/sys/random.h b/freebsd/sys/sys/random.h
index 396ec2b1..996ca5c1 100644
--- a/freebsd/sys/sys/random.h
+++ b/freebsd/sys/sys/random.h
@@ -50,11 +50,21 @@ read_random_uio(void *a __unused, u_int b __unused)
{
return (0);
}
+#ifndef __rtems__
static __inline u_int
read_random(void *a __unused, u_int b __unused)
{
return (0);
}
+#else /* __rtems__ */
+#include <unistd.h>
+static __inline u_int
+read_random(void *ptr, u_int n)
+{
+ getentropy(ptr, n);
+ return (n);
+}
+#endif /* __rtems__ */
#endif
/*