Print this page
9971 Make getrandom(2) a public interface
*** 8,24 ****
* source. A copy of the CDDL is also available via the Internet at
* http://www.illumos.org/license/CDDL.
*/
/*
! * Copyright (c) 2015 Joyent, Inc.
*/
#include <sys/types.h>
#include <sys/syscall.h>
#include <sys/random.h>
! int
! getrandom(void *buf, size_t len, int flags)
{
return (syscall(SYS_getrandom, buf, len, flags));
}
--- 8,24 ----
* source. A copy of the CDDL is also available via the Internet at
* http://www.illumos.org/license/CDDL.
*/
/*
! * Copyright (c) 2018 Joyent, Inc.
*/
#include <sys/types.h>
#include <sys/syscall.h>
#include <sys/random.h>
! ssize_t
! getrandom(void *buf, size_t len, unsigned int flags)
{
return (syscall(SYS_getrandom, buf, len, flags));
}