mirror of
https://github.com/wownero/RandomX.git
synced 2026-10-19 00:08:45 +02:00
Merge pull request #187 from tevador/pr-netbsd
Fix compilation and JIT support on NetBSD 1. Disable hugepages (not supported). 2. Force W^X (required). 3. When allocating JIT memory, PROT_EXEC must be reserved in order to set the pages executable later.
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ extern "C" {
|
||||
randomx_flags randomx_get_flags() {
|
||||
randomx_flags flags = RANDOMX_HAVE_COMPILER ? RANDOMX_FLAG_JIT : RANDOMX_FLAG_DEFAULT;
|
||||
randomx::Cpu cpu;
|
||||
#ifdef __OpenBSD__
|
||||
#ifdef RANDOMX_FORCE_SECURE
|
||||
if (flags == RANDOMX_FLAG_JIT) {
|
||||
flags |= RANDOMX_FLAG_SECURE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user