From 217f7cb16fe466b8be3cdb969655b4512d5e95fa Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Tue, 14 Sep 2021 10:31:34 +0200 Subject: Include errno message in mmap failure output It might help figure out why it is failing. --- yjit_asm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'yjit_asm.c') diff --git a/yjit_asm.c b/yjit_asm.c index 31e1528ff0..4a296e314c 100644 --- a/yjit_asm.c +++ b/yjit_asm.c @@ -7,6 +7,7 @@ #include #include #include +#include // For mmapp(), sysconf() #ifndef _WIN32 @@ -203,7 +204,7 @@ uint8_t* alloc_exec_mem(uint32_t mem_size) // Check that the memory mapping was successful if (mem_block == MAP_FAILED) { - fprintf(stderr, "mmap call failed\n"); + perror("mmap call failed"); exit(-1); } -- cgit v1.2.3