libc: minimal: Add reentrant rand_r function

This commit adds the `rand_r` function, which is a reentrant (i.e.
thread-safe) version of the `rand` function, such that a thread-safe
variant is always available.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2 files changed