mirror of https://github.com/ArduPilot/ardupilot
AP_Scripting: remove dependency on tmpnam
tmpnam is never linked and not necessary, and naming it/redefining it introduces problems on platforms that do have a definition.
This commit is contained in:
parent
c058fb0c19
commit
8b63488431
|
@ -106,6 +106,19 @@ static time_t l_checktime (lua_State *L, int arg) {
|
|||
** it uses mkstemp.
|
||||
** ===================================================================
|
||||
*/
|
||||
|
||||
#if defined(ARDUPILOT_BUILD)
|
||||
|
||||
/* os lib is not available in ArduPilot, and tmpnam is not available on some
|
||||
platforms, so define useless but harmless lua_tmpnam to avoid needing it */
|
||||
|
||||
#define LUA_TMPNAMBUFSIZE 1
|
||||
|
||||
/* always report error */
|
||||
#define lua_tmpnam(b, e) { e = 1; }
|
||||
|
||||
#endif // defined(ARDUPILOT_BUILD)
|
||||
|
||||
#if !defined(lua_tmpnam) /* { */
|
||||
|
||||
#if defined(LUA_USE_POSIX) /* { */
|
||||
|
|
Loading…
Reference in New Issue