ClickHouse/libs/libglibc-compatibility/musl/getrandom.c
2018-12-10 21:16:15 +03:00

11 lines
254 B
C

#include <unistd.h>
#include <syscall.h>
#include "syscall.h"
ssize_t getrandom(void *buf, size_t buflen, unsigned flags)
{
/// There was cancellable syscall (syscall_cp), but I don't care too.
return syscall(SYS_getrandom, buf, buflen, flags);
}