Print this page
9971 Make getrandom(2) a public interface
*** 21,31 ****
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
! * Copyright (c) 2015, Joyent, Inc.
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
*/
#ifndef _SYS_RANDOM_H
#define _SYS_RANDOM_H
--- 21,31 ----
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
! * Copyright (c) 2018, Joyent, Inc.
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
*/
#ifndef _SYS_RANDOM_H
#define _SYS_RANDOM_H
*** 66,81 ****
extern int random_get_pseudo_bytes(uint8_t *, size_t);
#endif /* _KERNEL */
/*
! * Flags for the getrandom system call. Note, we may want to move these
! * definitions if we expose getrandom(2) into a public system call.
*/
#define GRND_NONBLOCK 0x0001 /* O_NONBLOCK equiv */
#define GRND_RANDOM 0x0002 /* Use /dev/random, not /dev/urandom */
! extern int getrandom(void *, size_t, int);
#ifdef __cplusplus
}
#endif
--- 66,80 ----
extern int random_get_pseudo_bytes(uint8_t *, size_t);
#endif /* _KERNEL */
/*
! * Flags for the getrandom(2) system call.
*/
#define GRND_NONBLOCK 0x0001 /* O_NONBLOCK equiv */
#define GRND_RANDOM 0x0002 /* Use /dev/random, not /dev/urandom */
! extern ssize_t getrandom(void *, size_t, unsigned int);
#ifdef __cplusplus
}
#endif