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

@@ -21,11 +21,11 @@
 
 /*
  * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012 Milan Jurik. All rights reserved.
  * Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
- * Copyright (c) 2015, Joyent, Inc.
+ * Copyright (c) 2018, Joyent, Inc.
  */
 
 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
 /*        All Rights Reserved   */
 

@@ -327,11 +327,11 @@
 int     getsockname(int, struct sockaddr *, socklen_t *, int);
 int     getsockopt(int, int, int, void *, socklen_t *, int);
 int     setsockopt(int, int, int, void *, socklen_t *, int);
 int     sockconfig(int, void *, void *, void *, void *);
 ssize_t sendfilev(int, int, const struct sendfilevec *, int, size_t *);
-int     getrandom(void *, size_t, int);
+ssize_t getrandom(void *, size_t, unsigned int);
 
 typedef int64_t (*llfcn_t)();   /* for casting one-word returns */
 
 /*
  * Sysent initialization macros.

@@ -582,11 +582,11 @@
         /* 121 */ SYSENT_CL("readv",            readv,          3),
         /* 122 */ SYSENT_CL("writev",           writev,         3),
         /* 123 */ SYSENT_CL("preadv",           preadv,         5),
         /* 124 */ SYSENT_CL("pwritev",          pwritev,        5),
         /* 125 */ SYSENT_LOADABLE(),                    /* (was fxstat) */
-        /* 126 */ SYSENT_CI("getrandom",        getrandom,      3),
+        /* 126 */ SYSENT_CL("getrandom",        getrandom,      3),
         /* 127 */ SYSENT_CI("mmapobj",          mmapobjsys,     5),
         /* 128 */ IF_LP64(
                         SYSENT_CI("setrlimit",  setrlimit64,    2),
                         SYSENT_CI("setrlimit",  setrlimit32,    2)),
         /* 129 */ IF_LP64(