Fix compile errr when not enable Lua.

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
main
Jianhui Zhao 2018-03-12 10:57:50 +08:00
parent d2439b6f5c
commit 2210378a91
1 changed files with 8 additions and 0 deletions

View File

@ -25,7 +25,15 @@
static void hello_action(struct uh_client *cl)
{
#if (UHTTPD_LUA_SUPPORT)
uh_template(cl);
#else
cl->send_header(cl, 200, "OK", -1);
cl->header_end(cl);
cl->chunk_printf(cl, "<h1>Lua not enabled when compile</h1>");
cl->request_done(cl);
#endif
}
static void usage(const char *prog)