···000001## v2.0.0 (2025-02-03)
23* Remove now superfluous mirage-crypto-rng-{eio,lwt,async} packages
···1+## Pending
2+3+* Use arc4random_buf instead of getrandom on Android before getrandom
4+ became available in API 28.
5+6## v2.0.0 (2025-02-03)
78* Remove now superfluous mirage-crypto-rng-{eio,lwt,async} packages
+8-1
rng/unix/mc_getrandom_stubs.c
···9#include <caml/unixsupport.h>
10#include <caml/bigarray.h>
1112-#if defined(__linux) || defined(__GNU__)
000000013# include <errno.h>
14// on Linux and GNU/Hurd, we use getrandom and loop
15
···9#include <caml/unixsupport.h>
10#include <caml/bigarray.h>
1112+#if defined(__ANDROID_API__) && __ANDROID_API__ < 28
13+// on Android 27 and earlier, we use Google's <sys/random.h> recommended arc4random_buf
14+# include <stdlib.h>
15+16+void raw_getrandom (uint8_t *data, size_t len) {
17+ arc4random_buf(data, len);
18+}
19+#elif defined(__linux) || defined(__GNU__)
20# include <errno.h>
21// on Linux and GNU/Hurd, we use getrandom and loop
22