summaryrefslogtreecommitdiffhomepage
path: root/libs/luci-lib-nixio/src/nixio.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/luci-lib-nixio/src/nixio.h')
-rw-r--r--libs/luci-lib-nixio/src/nixio.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/luci-lib-nixio/src/nixio.h b/libs/luci-lib-nixio/src/nixio.h
index 8802e92043..25874eb04f 100644
--- a/libs/luci-lib-nixio/src/nixio.h
+++ b/libs/luci-lib-nixio/src/nixio.h
@@ -21,6 +21,10 @@
#include <lauxlib.h>
#include <luaconf.h>
+#if LUA_VERSION_NUM < 501
+#define luaL_Reg luaL_reg
+#endif
+
#define NIXIO_BUFFERSIZE 8192
typedef struct nixio_socket {
@@ -103,7 +107,9 @@ int nixio__mode_write(int mode, char *modestr);
int nixio__push_stat(lua_State *L, nixio_stat_t *buf);
-const char nixio__bin2hex[16];
+static const char nixio__bin2hex[16] = {
+'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
+};
/* Module functions */
void nixio_open_file(lua_State *L);