diff --git a/libraries/AP_Scripting/lua/src/loslib.c b/libraries/AP_Scripting/lua/src/loslib.c index de590c6b71..9510105778 100644 --- a/libraries/AP_Scripting/lua/src/loslib.c +++ b/libraries/AP_Scripting/lua/src/loslib.c @@ -81,7 +81,7 @@ static time_t l_checktime (lua_State *L, int arg) { ** where it uses gmtime_r/localtime_r */ -#if defined(LUA_USE_POSIX) /* { */ +#if defined(ARDUPILOT_BUILD) || defined(LUA_USE_POSIX) /* { */ #define l_gmtime(t,r) gmtime_r(t,r) #define l_localtime(t,r) localtime_r(t,r)