summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Richey <joerichey@google.com>2023-01-26 03:05:46 -0800
committerJoe Richey <joerichey@google.com>2023-01-26 03:05:46 -0800
commit328d723b9f7ab56693f5c257072e683f8c4aa303 (patch)
treea934123554f2be705692dd1e2f84e5ba3884247c
parentf4d5a669c44fa302cdf7c047ae1923c0f19b861e (diff)
downloadrust-libc-328d723b9f7ab56693f5c257072e683f8c4aa303.tar.gz
Solaris/Illumos: use correct types for getrandom(2) flags
On Solaris (and any other platform that supports it), the `getrandom(2)` syscall has signature: ```rust fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t; ``` so the flag constants (`GRND_NONBLOCK`, `GRND_RANDOM`, etc...) should be of type `c_uint`. I'm not sure if this sort of "bug fix" counts as a breaking change. Signed-off-by: Joe Richey <joerichey@google.com>
-rw-r--r--src/unix/solarish/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs
index 99135d5f59..88f9cab9d6 100644
--- a/src/unix/solarish/mod.rs
+++ b/src/unix/solarish/mod.rs
@@ -1280,8 +1280,8 @@ pub const FILENAME_MAX: ::c_uint = 1024;
pub const L_tmpnam: ::c_uint = 25;
pub const TMP_MAX: ::c_uint = 17576;
-pub const GRND_NONBLOCK: ::c_int = 0x0001;
-pub const GRND_RANDOM: ::c_int = 0x0002;
+pub const GRND_NONBLOCK: ::c_uint = 0x0001;
+pub const GRND_RANDOM: ::c_uint = 0x0002;
pub const O_RDONLY: ::c_int = 0;
pub const O_WRONLY: ::c_int = 1;