]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Compile fix to NetBSD: Don't use si_code which is a macro.
authorTimo Sirainen <tss@iki.fi>
Mon, 6 Apr 2009 21:15:37 +0000 (17:15 -0400)
committerTimo Sirainen <tss@iki.fi>
Mon, 6 Apr 2009 21:15:37 +0000 (17:15 -0400)
Patch by Tatsuyoshi.

--HG--
branch : HEAD

src/lib/lib-signals.c
src/lib/lib-signals.h

index e96cb9b39faab86df9d6e8694dae487f7aa87f86..9ab5e8d208c12931c5be4e27a9d09b5ce79b76de 100644 (file)
@@ -27,10 +27,10 @@ static int sig_pipe_fd[2] = { -1, -1 };
 static bool signals_initialized = FALSE;
 static struct io *io_sig = NULL;
 
-const char *lib_signal_code_to_str(int signo, int si_code)
+const char *lib_signal_code_to_str(int signo, int sicode)
 {
        /* common */
-       switch (si_code) {
+       switch (sicode) {
        case SI_USER:
                return "kill";
 #ifdef SI_KERNEL
@@ -43,7 +43,7 @@ const char *lib_signal_code_to_str(int signo, int si_code)
 
        switch (signo) {
        case SIGSEGV:
-               switch (si_code) {
+               switch (sicode) {
                case SEGV_MAPERR:
                        return "address not mapped";
                case SEGV_ACCERR:
@@ -51,7 +51,7 @@ const char *lib_signal_code_to_str(int signo, int si_code)
                }
                break;
        case SIGBUS:
-               switch (si_code) {
+               switch (sicode) {
                case BUS_ADRALN:
                        return "invalid address alignment";
                case BUS_ADRERR:
@@ -60,7 +60,7 @@ const char *lib_signal_code_to_str(int signo, int si_code)
                        return "object-specific hardware error";
                }
        }
-       return t_strdup_printf("unknown %d", si_code);
+       return t_strdup_printf("unknown %d", sicode);
 }
 
 static void sig_handler(int signo, siginfo_t *si, void *context ATTR_UNUSED)
index 273d7b8ed422fa62421e7db603d6d7e9d2ec563d..6da0c7de299d20faf9f88a5b772af4515dbf95fc 100644 (file)
@@ -6,7 +6,7 @@
 typedef void signal_handler_t(const siginfo_t *si, void *context);
 
 /* Convert si_code to string */
-const char *lib_signal_code_to_str(int signo, int si_code);
+const char *lib_signal_code_to_str(int signo, int sicode);
 
 /* Set signal handler for specific signal. If delayed is TRUE, the handler
    will be called later, ie. not as a real signal handler. */