luci-lib-nixio: fix compilation
Fixes: #2921
Fixes: f3f42ff09
("address: Replace ualarm with setitimer")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
2a1a60740a
commit
16f23de977
1 changed files with 1 additions and 1 deletions
|
@ -288,9 +288,9 @@ static int nixio_getnameinfo(lua_State *L) {
|
||||||
const char *family = luaL_optstring(L, 2, NULL);
|
const char *family = luaL_optstring(L, 2, NULL);
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
const struct itimerval t = { {timeout * 1000 * 1000, 0} , {0, 0} };
|
|
||||||
struct sigaction sa_new, sa_old;
|
struct sigaction sa_new, sa_old;
|
||||||
int timeout = luaL_optnumber(L, 3, 0);
|
int timeout = luaL_optnumber(L, 3, 0);
|
||||||
|
const struct itimerval t = { {timeout * 1000 * 1000, 0} , {0, 0} };
|
||||||
if (timeout > 0 && timeout < 1000)
|
if (timeout > 0 && timeout < 1000)
|
||||||
{
|
{
|
||||||
sa_new.sa_handler = nixio__handle_alarm;
|
sa_new.sa_handler = nixio__handle_alarm;
|
||||||
|
|
Loading…
Reference in a new issue