tkaitchuck / constrandom

Macro to generate random constants in Rust https://xkcd.com/221/
Apache License 2.0
73 stars 14 forks source link

Build without `getrandom` #3

Closed vbrandl closed 4 years ago

vbrandl commented 4 years ago

Is it possible to build this crate with glibc < 2.29 (without getrandom())?

tkaitchuck commented 4 years ago

@vbrandl Do you have a suggestion for a source of randomness? I could add a feature to switch it if there was another path available.

Amanieu commented 4 years ago

I think this is not an issue. The getrandom crate should work fine on systems without getrandom, it will just fall back down to reading from /dev/urandom.

vbrandl commented 4 years ago

Yeah seems like this was a problem on my site, due to conflicting versions of libc (2.30 from my Arch Linux and 2.26 at the time from the nix package manager). nix-unstable updated to 2.27 and the compilation error disappeared.