survivor

graphical action game for the linux terminal
git clone https://git.ce9e.org/survivor.git

commit
697e1d734fd02235720562d7bfae79bcd3bf0675
parent
1236b2c151665a0df35f2638017871342d051f78
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-02-19 08:11
fix libc compatibility

Diffstat

M src/random.rs 2 +-

1 files changed, 1 insertions, 1 deletions


diff --git a/src/random.rs b/src/random.rs

@@ -8,7 +8,7 @@ impl Rng {
    8     8     pub fn new() -> Self {
    9     9         let mut bytes = [0; 8];
   10    10         unsafe {
   11    -1             libc::getrandom(bytes.as_mut_ptr(), 8, 0x0001);
   -1    11             libc::getrandom(bytes.as_mut_ptr() as *mut libc::c_void, 8, 0x0001);
   12    12         }
   13    13         return Self {
   14    14             state: u64::from_ne_bytes(bytes),