From 2210378a91d34f5219579ebb3e1c4388e3735abb Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Mon, 12 Mar 2018 10:57:50 +0800 Subject: [PATCH] Fix compile errr when not enable Lua. Signed-off-by: Jianhui Zhao --- example/template.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/example/template.c b/example/template.c index 20af011..8346f40 100755 --- a/example/template.c +++ b/example/template.c @@ -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, "

Lua not enabled when compile

"); + cl->request_done(cl); +#endif } static void usage(const char *prog)