luci-lib-nixio: fix compilation
[project/luci.git] / libs / luci-lib-nixio / src / address.c
index ed3a4a1c6135511a1b1dbea601392761f0983fea..7957e8cc19aafa49bc220d3078b61500f452ce5d 100644 (file)
@@ -288,9 +288,9 @@ static int nixio_getnameinfo(lua_State *L) {
        const char *family = luaL_optstring(L, 2, NULL);
 
 #ifdef __linux__
-       const struct itimerval t = { {timeout * 1000 * 1000, 0} , {0, 0} };
        struct sigaction sa_new, sa_old;
        int timeout = luaL_optnumber(L, 3, 0);
+       const struct itimerval t = { {timeout * 1000 * 1000, 0} , {0, 0} };
        if (timeout > 0 && timeout < 1000)
        {
                sa_new.sa_handler = nixio__handle_alarm;