summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-01-28 14:53:37 +0000
committerbors <bors@rust-lang.org>2023-01-28 14:53:37 +0000
commit4d072b049d38e651dd037b1b9acfaa090e68ca33 (patch)
treec345276c450dd2c9110c7b4d49bd6740aa7cb91a
parentd1eb3e81813a0b569503bdc19e7d47a9dc03c6b8 (diff)
parent328d723b9f7ab56693f5c257072e683f8c4aa303 (diff)
downloadrust-libc-4d072b049d38e651dd037b1b9acfaa090e68ca33.tar.gz
Auto merge of #3090 - josephlr:solaris, r=JohnTitor
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, there weren't any Solaris/Illumos files under `libc-test/semver`. 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;