Print this page
9971 Make getrandom(2) a public interface

*** 8,18 **** * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* ! * Copyright (c) 2015, Joyent, Inc. */ /* * getrandom system call implementation */ --- 8,18 ---- * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* ! * Copyright (c) 2018, Joyent, Inc. */ /* * getrandom system call implementation */
*** 34,45 **** * than INT_MAX. */ #define MAXRANDBYTES 1024 #define MAXURANDBYTES INT_MAX ! int ! getrandom(void *bufp, size_t buflen, int flags) { int out = 0; uint8_t rbytes[128]; uint8_t *buf = bufp; --- 34,45 ---- * than INT_MAX. */ #define MAXRANDBYTES 1024 #define MAXURANDBYTES INT_MAX ! ssize_t ! getrandom(void *bufp, size_t buflen, unsigned int flags) { int out = 0; uint8_t rbytes[128]; uint8_t *buf = bufp;