From 6ecc318216334a321b26cdb254643feca8ed6660 Mon Sep 17 00:00:00 2001 From: Kevin Yang Date: Mon, 16 May 2016 14:46:56 -0700 Subject: [PATCH] fix duplicate symbols in cc_signal --- include/cc_signal.h | 2 +- src/cc_signal.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/cc_signal.h b/include/cc_signal.h index 61e151d9a..1fe67c8ff 100644 --- a/include/cc_signal.h +++ b/include/cc_signal.h @@ -48,7 +48,7 @@ struct signal { * - SIGSEGV(debug): print stacktrace before reraise segfault again * - SIGPIPE(channel): ignored, this prevents service from exiting when pipe closes */ -struct signal signals[SIGNAL_MAX]; /* there are only 31 signals from 1 to 31 */ +extern struct signal signals[SIGNAL_MAX]; /* there are only 31 signals from 1 to 31 */ int signal_override(int signo, char *info, int flags, uint32_t mask, sig_fn handler); diff --git a/src/cc_signal.c b/src/cc_signal.c index 222ee7e52..726e2c4c2 100644 --- a/src/cc_signal.c +++ b/src/cc_signal.c @@ -8,6 +8,8 @@ #include #include +struct signal signals[SIGNAL_MAX]; + #ifndef CC_HAVE_SIGNAME const char* sys_signame[SIGNAL_MAX + 1] = { "UNDEFINED",