From 9f77f8b24f7fcce66678b5c73ca82ceb23576536 Mon Sep 17 00:00:00 2001 From: enginix Date: Thu, 30 Jun 2016 15:40:51 +0800 Subject: [PATCH] unix socket: compat lua 5.1 --- src/makefile | 1 + src/unixtcp.c | 3 ++- src/unixudp.c | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/makefile b/src/makefile index 0e4a544..2ffd7d9 100644 --- a/src/makefile +++ b/src/makefile @@ -309,6 +309,7 @@ UNIX_OBJS=\ usocket.$(O) \ unixtcp.$(O) \ unixudp.$(O) \ + compat.$(O) \ unix.$(O) #------ diff --git a/src/unixtcp.c b/src/unixtcp.c index 88baac0..a9c4962 100644 --- a/src/unixtcp.c +++ b/src/unixtcp.c @@ -6,6 +6,7 @@ #include "lua.h" #include "lauxlib.h" +#include "compat.h" #include "auxiliar.h" #include "socket.h" @@ -90,7 +91,7 @@ int unixtcp_open(lua_State *L) auxiliar_add2group(L, "unixtcp{server}", "unixtcp{any}"); luaL_setfuncs(L, func, 0); - return 1; + return 0; } /*=========================================================================*\ diff --git a/src/unixudp.c b/src/unixudp.c index ec348cf..75f5b08 100644 --- a/src/unixudp.c +++ b/src/unixudp.c @@ -7,6 +7,7 @@ #include "lua.h" #include "lauxlib.h" +#include "compat.h" #include "auxiliar.h" #include "socket.h" @@ -86,7 +87,7 @@ int unixudp_open(lua_State *L) auxiliar_add2group(L, "unixudp{unconnected}", "select{able}"); luaL_setfuncs(L, func, 0); - return 1; + return 0; } /*=========================================================================*\