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.
*/
/*
* getentropy(3C) is an OpenBSD compatible wrapper around getrandom(2).
*/
@@ -21,11 +21,11 @@
#include <sys/random.h>
int
getentropy(void *buf, size_t buflen)
{
- int ret;
+ ssize_t ret;
if (buflen > 256) {
errno = EIO;
return (-1);
}