summaryrefslogtreecommitdiff
path: root/main/asterisk.c
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2015-01-26 14:49:32 +0000
committerDavid M. Lee <dlee@digium.com>2015-01-26 14:49:32 +0000
commit702d79de2a2341954ef599f4c5a4c5f31c1b5edc (patch)
tree84e0fa7843ca364b485781655627e82fa021fea3 /main/asterisk.c
parent1fc823c770461689d44a1a8bd14f57a6ddf92372 (diff)
Various fixes for OS X
This patch addresses compilation errors on OS X. It's been a while, so there's quite a few things. * Fixed __attribute__ decls in route.h to be portable. * Fixed htonll and ntohll to work when they are defined as macros. * Replaced sem_t usage with our ast_sem wrapper. * Added ast_sem_timedwait to our ast_sem wrapper. * Fixed some GCC 4.9 warnings using sig*set() functions. * Fixed some format strings for portability. * Fixed compilation issues with res_timing_kqueue (although tests still fail on OS X). * Fixed menuconfig /sbin/launchd detection, which disables res_timing_kqueue on OS X). ASTERISK-24539 #close Reported by: George Joseph ASTERISK-24544 #close Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/4327/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 7378d2271..1e5829616 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -4366,12 +4366,14 @@ int main(int argc, char *argv[])
}
ast_makesocket();
- sigemptyset(&sigs);
- sigaddset(&sigs, SIGHUP);
- sigaddset(&sigs, SIGTERM);
- sigaddset(&sigs, SIGINT);
- sigaddset(&sigs, SIGPIPE);
- sigaddset(&sigs, SIGWINCH);
+ /* GCC 4.9 gives a bogus "right-hand operand of comma expression has
+ * no effect" warning */
+ (void) sigemptyset(&sigs);
+ (void) sigaddset(&sigs, SIGHUP);
+ (void) sigaddset(&sigs, SIGTERM);
+ (void) sigaddset(&sigs, SIGINT);
+ (void) sigaddset(&sigs, SIGPIPE);
+ (void) sigaddset(&sigs, SIGWINCH);
pthread_sigmask(SIG_BLOCK, &sigs, NULL);
sigaction(SIGURG, &urg_handler, NULL);
signal(SIGINT, __quit_handler);