[Asterisk-code-review] Fix to include signal.h (asterisk[master])

Timo Teräs asteriskteam at digium.com
Fri Jun 3 01:17:47 CDT 2016


Timo Teräs has uploaded a new change for review.

  https://gerrit.asterisk.org/2937

Change subject: Fix to include signal.h
......................................................................

Fix 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, 17 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/37/2937/1

diff --git a/addons/chan_ooh323.h b/addons/chan_ooh323.h
index 89caaff..281f7dd 100644
--- a/addons/chan_ooh323.h
+++ b/addons/chan_ooh323.h
@@ -38,7 +38,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <signal.h>
-#include <sys/signal.h>
+#include <signal.h>
 
 #include "asterisk/lock.h"
 #include "asterisk/channel.h"
diff --git a/apps/app_dahdiras.c b/apps/app_dahdiras.c
index e8bdad0..ec587ef 100644
--- a/apps/app_dahdiras.c
+++ b/apps/app_dahdiras.c
@@ -37,7 +37,7 @@
 #include <sys/ioctl.h>
 #include <sys/wait.h>
 #ifdef __linux__
-#include <sys/signal.h>
+#include <signal.h>
 #else
 #include <signal.h>
 #endif /* __linux__ */
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..40ad2bc 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -60,7 +60,7 @@
 #include <pthread.h>
 #include <signal.h>
 #else
-#include <sys/signal.h>
+#include <signal.h>
 #endif
 #include <sys/stat.h>
 #include <math.h>
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index af44de9..5ce9168 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -68,7 +68,7 @@
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <sys/time.h>
-#include <sys/signal.h>
+#include <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..a7da00a 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -47,7 +47,7 @@
 #include <net/if.h>
 #include <fcntl.h>
 #include <netdb.h>
-#include <sys/signal.h>
+#include <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..a9e3791 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -224,7 +224,7 @@
 ASTERISK_REGISTER_FILE()
 
 #include <signal.h>
-#include <sys/signal.h>
+#include <signal.h>
 #include <regex.h>
 #include <inttypes.h>
 
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 76990d1..7fc6f82 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -49,7 +49,7 @@
 #include <fcntl.h>
 #include <netdb.h>
 #include <arpa/inet.h>
-#include <sys/signal.h>
+#include <signal.h>
 #include <signal.h>
 #include <ctype.h>
 
diff --git a/main/cli.c b/main/cli.c
index f2bedc9..61f4f32 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -42,7 +42,7 @@
 
 #include "asterisk/_private.h"
 #include "asterisk/paths.h"	/* use ast_config_AST_MODULE_DIR */
-#include <sys/signal.h>
+#include <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..ae2ab1a 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -38,7 +38,7 @@
 #endif
 
 #include <signal.h>
-#include <sys/signal.h>
+#include <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: newchange
Gerrit-Change-Id: Ia56b0aa1d84b5c590114867b1b384a624f39a6fc
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Timo Teräs <timo.teras at iki.fi>



More information about the asterisk-code-review mailing list