mirror of
https://github.com/wownero/RandomWOW.git
synced 2026-10-17 15:31:46 +02:00
Fixed tests on OpenBSD
Since OpenBSD 6.0 W^X is enforced. Added `RANDOMX_FLAG_SECURE` in tests and benchmarks. Updated comment. Excluded `cpu_set_t` since it is not defined on OpenBSD.
This commit is contained in:
@@ -42,6 +42,11 @@ extern "C" {
|
||||
randomx_flags randomx_get_flags() {
|
||||
randomx_flags flags = RANDOMX_HAVE_COMPILER ? RANDOMX_FLAG_JIT : RANDOMX_FLAG_DEFAULT;
|
||||
randomx::Cpu cpu;
|
||||
#ifdef __OpenBSD__
|
||||
if (flags == RANDOMX_FLAG_JIT) {
|
||||
flags |= RANDOMX_FLAG_SECURE;
|
||||
}
|
||||
#endif
|
||||
if (HAVE_AES && cpu.hasAes()) {
|
||||
flags |= RANDOMX_FLAG_HARD_AES;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user