summaryrefslogtreecommitdiffstats
path: root/src/pages.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages.c')
-rw-r--r--src/pages.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pages.c b/src/pages.c
index 46c307b..86907aa 100644
--- a/src/pages.c
+++ b/src/pages.c
@@ -351,6 +351,9 @@ os_overcommits_proc(void) {
#if defined(JEMALLOC_USE_SYSCALL) && defined(SYS_open)
fd = (int)syscall(SYS_open, "/proc/sys/vm/overcommit_memory", O_RDONLY);
+#elif defined(JEMALLOC_USE_SYSCALL) && defined(SYS_openat)
+ fd = (int)syscall(SYS_openat,
+ AT_FDCWD, "/proc/sys/vm/overcommit_memory", O_RDONLY);
#else
fd = open("/proc/sys/vm/overcommit_memory", O_RDONLY);
#endif