X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=util-src%2Fsignal.c;h=961d2d3e06acda484613a0ebdfc54a8f25625586;hb=8d15cb8b83eb8a1b287bdd06a32750076d867287;hp=fbcfabd902857327256ca597709af90ea718901d;hpb=110f458d0257b8e957fd24febfb9670149a450e7;p=prosody.git diff --git a/util-src/signal.c b/util-src/signal.c index fbcfabd9..961d2d3e 100644 --- a/util-src/signal.c +++ b/util-src/signal.c @@ -29,10 +29,6 @@ #include #include -#if defined(__unix__) || defined(__APPLE__) -#include -#endif - #include "lua.h" #include "lauxlib.h" @@ -169,13 +165,13 @@ static struct signal_event *last_event = NULL; static void sighook(lua_State *L, lua_Debug *ar) { + struct signal_event *event; /* restore the old hook */ lua_sethook(L, Hsig, Hmask, Hcount); lua_pushstring(L, LUA_SIGNAL); lua_gettable(L, LUA_REGISTRYINDEX); - struct signal_event *event; while((event = signal_queue)) { lua_pushnumber(L, event->Nsig);