Skip to content

Commit

Permalink
Fix compile errr when not enable Lua.
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <[email protected]>
  • Loading branch information
Jianhui Zhao committed Mar 12, 2018
1 parent d2439b6 commit 2210378
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions example/template.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2210378

Please sign in to comment.