From 18e28ef879418e36e769d9f9b7d89c36a83ca76b Mon Sep 17 00:00:00 2001
From: Sergey Lyubka <valenok@gmail.com>
Date: Sun, 9 Mar 2014 20:22:51 +0000
Subject: [PATCH] Added lua includes

---
 mongoose.c |  3 ---
 mongoose.h | 10 ++++++----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/mongoose.c b/mongoose.c
index 7c22ae9ff..e91574355 100644
--- a/mongoose.c
+++ b/mongoose.c
@@ -3684,9 +3684,6 @@ int mg_parse_header(const char *s, const char *var_name, char *buf,
 }
 
 #ifdef MONGOOSE_USE_LUA
-#include <lua.h>
-#include <lauxlib.h>
-
 #ifdef _WIN32
 static void *mmap(void *addr, int64_t len, int prot, int flags, int fd,
                   int offset) {
diff --git a/mongoose.h b/mongoose.h
index dfece9309..ca7175918 100644
--- a/mongoose.h
+++ b/mongoose.h
@@ -114,10 +114,12 @@ int mg_authorize_digest(struct mg_connection *c, FILE *fp);
 
 // Lua utility functions
 #ifdef MONGOOSE_USE_LUA
-void reg_string(struct lua_State *L, const char *name, const char *val);
-void reg_int(struct lua_State *L, const char *name, int val);
-void reg_function(struct lua_State *L, const char *name,
-                         lua_CFunction func, struct mg_connection *conn);
+#include <lua.h>
+#include <lauxlib.h>
+void reg_string(lua_State *L, const char *name, const char *val);
+void reg_int(lua_State *L, const char *name, int val);
+void reg_function(lua_State *L, const char *,
+                         lua_CFunction, struct mg_connection *);
 #endif
 
 #ifdef __cplusplus
-- 
GitLab