Skip to content

Commit 4d072b0

Browse files
committed
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 <[email protected]>
2 parents d1eb3e8 + 328d723 commit 4d072b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/unix/solarish/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1280,8 +1280,8 @@ pub const FILENAME_MAX: ::c_uint = 1024;
12801280
pub const L_tmpnam: ::c_uint = 25;
12811281
pub const TMP_MAX: ::c_uint = 17576;
12821282

1283-
pub const GRND_NONBLOCK: ::c_int = 0x0001;
1284-
pub const GRND_RANDOM: ::c_int = 0x0002;
1283+
pub const GRND_NONBLOCK: ::c_uint = 0x0001;
1284+
pub const GRND_RANDOM: ::c_uint = 0x0002;
12851285

12861286
pub const O_RDONLY: ::c_int = 0;
12871287
pub const O_WRONLY: ::c_int = 1;

0 commit comments

Comments
 (0)