From dcbfae8a2877618ef40cb5aea6f1a7027ae40331 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 19 Dec 2023 21:06:18 +0200 Subject: [PATCH] drc: try to unbreak 3ds it doesn't implement _SC_PAGESIZE --- libpcsxcore/new_dynarec/new_dynarec.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index b4295239..d9438d88 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -6263,11 +6263,13 @@ void new_dynarec_clear_full(void) static int pgsize(void) { + long ret = -1; #ifdef _SC_PAGESIZE - return sysconf(_SC_PAGESIZE); -#else - return 4096; + ret = sysconf(_SC_PAGESIZE); #endif + if (ret < 1) + ret = 4096; + return ret; } void new_dynarec_init(void) -- 2.39.5