diff --git a/src/lj_dispatch.h b/src/lj_dispatch.h index 52762eea..e81794ac 100644 --- a/src/lj_dispatch.h +++ b/src/lj_dispatch.h @@ -144,6 +144,7 @@ LJ_FUNCA void LJ_FASTCALL lj_dispatch_stitch(jit_State *J, const BCIns *pc); LJ_FUNCA void LJ_FASTCALL lj_dispatch_profile(lua_State *L, const BCIns *pc); #endif +#if !defined(ERRNO_SAVE) && !defined(ERRNO_RESTORE) #if LJ_HASFFI && !defined(_BUILDVM_H) /* Save/restore errno and GetLastError() around hooks, exits and recording. */ #include @@ -160,5 +161,6 @@ LJ_FUNCA void LJ_FASTCALL lj_dispatch_profile(lua_State *L, const BCIns *pc); #define ERRNO_SAVE #define ERRNO_RESTORE #endif +#endif #endif