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

@@ -8,11 +8,11 @@
  * source.  A copy of the CDDL is also available via the Internet at
  * http://www.illumos.org/license/CDDL.
  */
 
 /*
- * Copyright (c) 2015, Joyent, Inc.
+ * Copyright (c) 2018, Joyent, Inc.
  */
 
 /*
  * getrandom system call implementation
  */

@@ -34,12 +34,12 @@
  * than INT_MAX.
  */
 #define MAXRANDBYTES    1024
 #define MAXURANDBYTES   INT_MAX
 
-int
-getrandom(void *bufp, size_t buflen, int flags)
+ssize_t
+getrandom(void *bufp, size_t buflen, unsigned int flags)
 {
         int out = 0;
         uint8_t rbytes[128];
         uint8_t *buf = bufp;