drc: try to unbreak 3ds
authornotaz <notasas@gmail.com>
Tue, 19 Dec 2023 19:06:18 +0000 (21:06 +0200)
committernotaz <notasas@gmail.com>
Tue, 19 Dec 2023 19:06:18 +0000 (21:06 +0200)
it doesn't implement _SC_PAGESIZE

libpcsxcore/new_dynarec/new_dynarec.c

index b429523..d9438d8 100644 (file)
@@ -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)