diff --git a/config.mk b/config.mk index f555812..0c96010 100644 --- a/config.mk +++ b/config.mk @@ -16,7 +16,7 @@ INCS+= `pkg-config --cflags libnotify` LIBS+= `pkg-config --libs libnotify` # flags -CPPFLAGS = -DVERSION=\"${VERSION}\" +CPPFLAGS = -DVERSION=\"${VERSION}\" -D_POSIX_C_SOURCE CFLAGS += -g -std=c99 -pedantic -Wall -Os ${INCS} ${DEFS} ${CPPFLAGS} LDFLAGS += -g ${LIBS} diff --git a/spt.c b/spt.c index e1d5e7e..21744d7 100644 --- a/spt.c +++ b/spt.c @@ -108,6 +108,7 @@ usage(void) int main(int argc, char *argv[]) { + sigset_t *emptymask = 0; suspend = 0; ARGBEGIN { @@ -135,7 +136,7 @@ main(int argc, char *argv[]) timecount = 0; while (timecount < timers[i].tmr) if (suspend) - pause(); + sigsuspend(emptymask); else { sleep(1); timecount++;