AP_Scripting: use gmtime_r() instead of gmtime()

using gmtime_r makes gmtime thread safe
This commit is contained in:
Andrew Tridgell 2024-02-07 09:32:49 +11:00
parent 052ce823ba
commit b3240ac243

View File

@ -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)