Skip to content

Commit 06b1f11

Browse files
[libc] fix sysconf test for rv32
1 parent 36bce68 commit 06b1f11

File tree

1 file changed

+2
-1
lines changed
  • libc/src/__support/OSUtil/linux

1 file changed

+2
-1
lines changed

libc/src/__support/OSUtil/linux/auxv.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include <linux/auxvec.h> // For AT_ macros
1818
#include <linux/mman.h> // For mmap flags
19+
#include <linux/param.h> // For EXEC_PAGESIZE
1920
#include <linux/prctl.h> // For prctl
2021
#include <sys/syscall.h> // For syscall numbers
2122

@@ -90,7 +91,7 @@ LIBC_INLINE void Vector::fallback_initialize_unsync() {
9091
PROT_READ | PROT_WRITE,
9192
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
9293
// We do not proceed if mmap fails.
93-
if (mmap_ret <= 0)
94+
if (mmap_ret <= 0 && mmap_ret > -EXEC_PAGESIZE)
9495
return;
9596

9697
// Initialize the auxv array with AT_NULL entries.

0 commit comments

Comments
 (0)