Skip to content
Snippets Groups Projects
Commit ddb6f0b5 authored by Vladimir Davydov's avatar Vladimir Davydov
Browse files

Fix compilation with ENABLE_BACKTRACE=OFF

  src/lua/init.c: In function ‘tarantool_panic_handler’:
  src/lua/init.c:321:2: error: implicit declaration of function ‘print_backtrace’ [-Werror=implicit-function-declaration]
    print_backtrace();
    ^~~~~~~~~~~~~~~

  src/lua/fiber.c:244:1: error: ‘lbox_fiber_statof_bt’ defined but not used [-Werror=unused-function]
   lbox_fiber_statof_bt(struct fiber *f, void *cb_ctx)
   ^~~~~~~~~~~~~~~~~~~~
parent 6b49134d
No related branches found
No related tags found
No related merge requests found
......@@ -240,11 +240,13 @@ lbox_fiber_statof(struct fiber *f, void *cb_ctx, bool backtrace)
return 0;
}
#ifdef ENABLE_BACKTRACE
static int
lbox_fiber_statof_bt(struct fiber *f, void *cb_ctx)
{
return lbox_fiber_statof(f, cb_ctx, true);
}
#endif
static int
lbox_fiber_statof_nobt(struct fiber *f, void *cb_ctx)
......
......@@ -318,7 +318,9 @@ tarantool_lua_setpaths(struct lua_State *L)
static int
tarantool_panic_handler(lua_State *L) {
const char *problem = lua_tostring(L, -1);
#ifdef ENABLE_BACKTRACE
print_backtrace();
#endif
say_crit("%s", problem);
int level = 1;
lua_Debug ar;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment