[asterisk-commits] Fixes to include signal.h (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 9 04:40:25 CDT 2016
Joshua Colp has submitted this change and it was merged.
Change subject: Fixes to include signal.h
......................................................................
Fixes to include signal.h
POSIX defines signal.h. sys/signal.h should not be used as it is
c-library internal header which may or may not exist. Notably with
musl it generates warning of being incorrect.
Change-Id: Ia56b0aa1d84b5c590114867b1b384a624f39a6fc
---
M addons/chan_ooh323.h
M apps/app_dahdiras.c
M apps/app_dial.c
M apps/app_queue.c
M channels/chan_console.c
M channels/chan_dahdi.c
M channels/chan_iax2.c
M channels/chan_mgcp.c
M channels/chan_motif.c
M channels/chan_sip.c
M channels/chan_skinny.c
M main/cli.c
M main/features.c
M main/http.c
M main/tcptls.c
M pbx/pbx_dundi.c
M res/res_musiconhold.c
17 files changed, 9 insertions(+), 23 deletions(-)
Approvals:
Mark Michelson: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Verified
diff --git a/addons/chan_ooh323.h b/addons/chan_ooh323.h
index 89caaff..1279a22 100644
--- a/addons/chan_ooh323.h
+++ b/addons/chan_ooh323.h
@@ -38,7 +38,6 @@
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
-#include <sys/signal.h>
#include "asterisk/lock.h"
#include "asterisk/channel.h"
diff --git a/apps/app_dahdiras.c b/apps/app_dahdiras.c
index e8bdad0..51921a9 100644
--- a/apps/app_dahdiras.c
+++ b/apps/app_dahdiras.c
@@ -36,12 +36,7 @@
#include <sys/ioctl.h>
#include <sys/wait.h>
-#ifdef __linux__
-#include <sys/signal.h>
-#else
#include <signal.h>
-#endif /* __linux__ */
-
#include <fcntl.h>
#include <dahdi/user.h>
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 5e034d3..f05521b 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -35,7 +35,7 @@
ASTERISK_REGISTER_FILE()
#include <sys/time.h>
-#include <sys/signal.h>
+#include <signal.h>
#include <sys/stat.h>
#include <netinet/in.h>
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 165924e..cd545d2 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -72,7 +72,7 @@
ASTERISK_REGISTER_FILE()
#include <sys/time.h>
-#include <sys/signal.h>
+#include <signal.h>
#include <netinet/in.h>
#include <ctype.h>
diff --git a/channels/chan_console.c b/channels/chan_console.c
index 9fdecd7..bd849ad 100644
--- a/channels/chan_console.c
+++ b/channels/chan_console.c
@@ -64,7 +64,7 @@
ASTERISK_REGISTER_FILE()
-#include <sys/signal.h> /* SIGURG */
+#include <signal.h> /* SIGURG */
#include <portaudio.h>
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 2d92343..e4b7c0e 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -58,10 +58,8 @@
#if defined(__NetBSD__) || defined(__FreeBSD__)
#include <pthread.h>
-#include <signal.h>
-#else
-#include <sys/signal.h>
#endif
+#include <signal.h>
#include <sys/stat.h>
#include <math.h>
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index af44de9..721da9a 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -68,7 +68,6 @@
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <sys/time.h>
-#include <sys/signal.h>
#include <signal.h>
#include <strings.h>
#include <netdb.h>
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 8714ddb..6df5d3f 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -47,7 +47,6 @@
#include <net/if.h>
#include <fcntl.h>
#include <netdb.h>
-#include <sys/signal.h>
#include <signal.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
diff --git a/channels/chan_motif.c b/channels/chan_motif.c
index 118d1d9..0c71092 100644
--- a/channels/chan_motif.c
+++ b/channels/chan_motif.c
@@ -51,7 +51,7 @@
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <sys/signal.h>
+#include <signal.h>
#include <iksemel.h>
#include <pthread.h>
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 19f8aa3..fc26e7e 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -224,7 +224,6 @@
ASTERISK_REGISTER_FILE()
#include <signal.h>
-#include <sys/signal.h>
#include <regex.h>
#include <inttypes.h>
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 76990d1..fb6e619 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -49,7 +49,6 @@
#include <fcntl.h>
#include <netdb.h>
#include <arpa/inet.h>
-#include <sys/signal.h>
#include <signal.h>
#include <ctype.h>
diff --git a/main/cli.c b/main/cli.c
index f2bedc9..8af20b6 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -42,7 +42,6 @@
#include "asterisk/_private.h"
#include "asterisk/paths.h" /* use ast_config_AST_MODULE_DIR */
-#include <sys/signal.h>
#include <signal.h>
#include <ctype.h>
#include <regex.h>
diff --git a/main/features.c b/main/features.c
index 7dfe4cd..6806fe7 100644
--- a/main/features.c
+++ b/main/features.c
@@ -46,7 +46,7 @@
#include <pthread.h>
#include <signal.h>
#include <sys/time.h>
-#include <sys/signal.h>
+#include <signal.h>
#include <netinet/in.h>
#include "asterisk/lock.h"
diff --git a/main/http.c b/main/http.c
index 5ec94a7..a836282 100644
--- a/main/http.c
+++ b/main/http.c
@@ -49,7 +49,7 @@
#include <time.h>
#include <sys/time.h>
#include <sys/stat.h>
-#include <sys/signal.h>
+#include <signal.h>
#include <fcntl.h>
#include "asterisk/paths.h" /* use ast_config_AST_DATA_DIR */
diff --git a/main/tcptls.c b/main/tcptls.c
index f56e0aa..046501b 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -38,7 +38,6 @@
#endif
#include <signal.h>
-#include <sys/signal.h>
#include "asterisk/compat.h"
#include "asterisk/tcptls.h"
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 10495ac..94b71a0 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -43,7 +43,7 @@
#include "asterisk/network.h"
#include <sys/ioctl.h>
#include <zlib.h>
-#include <sys/signal.h>
+#include <signal.h>
#include <pthread.h>
#include <net/if.h>
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index f124d58..3c7199e 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -44,7 +44,7 @@
#include <ctype.h>
#include <signal.h>
#include <sys/time.h>
-#include <sys/signal.h>
+#include <signal.h>
#include <netinet/in.h>
#include <sys/stat.h>
#include <dirent.h>
--
To view, visit https://gerrit.asterisk.org/2937
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia56b0aa1d84b5c590114867b1b384a624f39a6fc
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Timo Teräs <timo.teras at iki.fi>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list