mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Add getrandom.c from musl
This commit is contained in:
parent
77c884b7ff
commit
ca9d6d83b5
@ -18,7 +18,8 @@ musl/syscall_ret.c
|
|||||||
musl/sched_cpucount.c
|
musl/sched_cpucount.c
|
||||||
musl/glob.c
|
musl/glob.c
|
||||||
musl/exp2f.c
|
musl/exp2f.c
|
||||||
musl/pwritev.c)
|
musl/pwritev.c
|
||||||
|
musl/getrandom.c)
|
||||||
|
|
||||||
if (MAKE_STATIC_LIBRARIES)
|
if (MAKE_STATIC_LIBRARIES)
|
||||||
set (GLIBC_COMPATIBILITY_SOURCES ${GLIBC_COMPATIBILITY_SOURCES}
|
set (GLIBC_COMPATIBILITY_SOURCES ${GLIBC_COMPATIBILITY_SOURCES}
|
||||||
|
10
libs/libglibc-compatibility/musl/getrandom.c
Normal file
10
libs/libglibc-compatibility/musl/getrandom.c
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#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);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user