This repository was archived by the owner on Dec 8, 2021. It is now read-only.
Commit f3bddd1
authored
fix: use a safer token to workaround libstdc++ bug (#272)
The workaround put in place in #208 does not work with g++-9.3.1 on
Fedora:31. Despite this being a "newer" version of libstdc++, it does
not support `rdrand` as a token for `std::random_device` maybe because
the CPU specific tokens are not enabled.
For now, use `/dev/urandom` which seems to be supported on all Linux
distros. On other platforms we continue to use the default constructor
for `std::random_device`.
It might be possible to refine this and detect, at run-time, if `rdrand`
is supported, but that seems like an improvement that can wait a little
bit.1 parent e1a58fb commit f3bddd1
1 file changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
0 commit comments