Hi,

I'm puzzled trying to update redis to its latest version (2.2.4).

How to fix the following build error?

redis.c: In function 'setupSignalHandlers':
redis.c:1662: error: 'SA_NODEFER' undeclared (first use in this function)
redis.c:1662: error: (Each undeclared identifier is reported only once
redis.c:1662: error: for each function it appears in.)
redis.c:1662: error: 'SA_ONSTACK' undeclared (first use in this function)
redis.c:1662: error: 'SA_RESETHAND' undeclared (first use in this function)

The offending code is:

void setupSignalHandlers(void) {
    struct sigaction act;

    /* When the SA_SIGINFO flag is set in sa_flags then sa_sigaction is used.
     * Otherwise, sa_handler is used. */
    sigemptyset(&act.sa_mask);
    act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND;
    act.sa_handler = sigtermHandler;
    sigaction(SIGTERM, &act, NULL);

    return;
}

...And signal.h is included.

Hoping gmail does not make a mess of this msg

Ciao,
David

Reply via email to