aboutsummaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/inet.c')
-rw-r--r--src/inet.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/inet.c b/src/inet.c
index 48e654b..68087db 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -8,6 +8,7 @@
8 8
9#include "lua.h" 9#include "lua.h"
10#include "lauxlib.h" 10#include "lauxlib.h"
11#include "compat.h"
11 12
12#include "inet.h" 13#include "inet.h"
13 14
@@ -41,11 +42,7 @@ int inet_open(lua_State *L)
41{ 42{
42 lua_pushstring(L, "dns"); 43 lua_pushstring(L, "dns");
43 lua_newtable(L); 44 lua_newtable(L);
44#if LUA_VERSION_NUM > 501 && !defined(LUA_COMPAT_MODULE)
45 luaL_setfuncs(L, func, 0); 45 luaL_setfuncs(L, func, 0);
46#else
47 luaL_openlib(L, NULL, func, 0);
48#endif
49 lua_settable(L, -3); 46 lua_settable(L, -3);
50 return 0; 47 return 0;
51} 48}