diff --git a/module/lua/ldo.c b/module/lua/ldo.c index 59d0b6a2c2..3b0ece171c 100644 --- a/module/lua/ldo.c +++ b/module/lua/ldo.c @@ -46,6 +46,7 @@ #ifdef _KERNEL +#ifdef __linux__ #if defined(__i386__) #define JMP_BUF_CNT 6 #elif defined(__x86_64__) @@ -85,6 +86,11 @@ void longjmp (label_t * buf) { for (;;); } #endif +#else +#define LUAI_THROW(L,c) longjmp((c)->b, 1) +#define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } +#define luai_jmpbuf jmp_buf +#endif #else /* _KERNEL */