From af75775bac9bc6b175d5f0fd681ef43c00ac1e55 Mon Sep 17 00:00:00 2001 From: Jim Huang Date: Sat, 12 Nov 2022 01:24:33 +0800 Subject: [PATCH] Fix build on macOS Corresponding compilation errors: ir_private.h:11:10: fatal error: 'malloc.h' file not found ir_gdb.c:162:17: error: implicit declaration of function 'offsetof' is invalid in C99 [-Werror,-Wimplicit-function-declaration] .shofs = offsetof(ir_gdbjit_obj, sect), --- ir_gdb.c | 1 + ir_private.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ir_gdb.c b/ir_gdb.c index a231f56..7272bc8 100644 --- a/ir_gdb.c +++ b/ir_gdb.c @@ -7,6 +7,7 @@ * Based on Mike Pall's implementation of GDB interface for LuaJIT. */ +#include #include #include #include diff --git a/ir_private.h b/ir_private.h index 802c6f0..107f395 100644 --- a/ir_private.h +++ b/ir_private.h @@ -8,7 +8,7 @@ #ifndef IR_PRIVATE_H #define IR_PRIVATE_H #include -#include +#include #ifdef IR_DEBUG # include