Module: kamailio
Branch: master
Commit: 4d485707f7e53e798466dc6ae2166eddbe874b95
URL:
https://github.com/kamailio/kamailio/commit/4d485707f7e53e798466dc6ae2166ed…
Author: Timo Teräs <timo.teras(a)iki.fi>
Committer: Timo Teräs <timo.teras(a)iki.fi>
Date: 2017-04-28T10:02:40+03:00
Add and fix #includes for more strict POSIX compliance
- sys/poll.h is non-standard, posix defines poll.h
- sys/time.h is needed in addition to time.h for e.g. struct timeval
Notable this fixes some build errors against musl libc
---
Modified: src/core/tsend.c
Modified: src/modules/ldap/ld_session.h
Modified: src/modules/seas/event_dispatcher.c
Modified: src/modules/tls/tls_server.c
Modified: utils/kamcmd/kamcmd.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4d485707f7e53e798466dc6ae2166ed…
Patch:
https://github.com/kamailio/kamailio/commit/4d485707f7e53e798466dc6ae2166ed…
---
diff --git a/src/core/tsend.c b/src/core/tsend.c
index 97463fc..60c70af 100644
--- a/src/core/tsend.c
+++ b/src/core/tsend.c
@@ -27,7 +27,7 @@
#include <string.h>
#include <errno.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/types.h>
#include <sys/socket.h>
diff --git a/src/modules/ldap/ld_session.h b/src/modules/ldap/ld_session.h
index 08a752c..0591f79 100644
--- a/src/modules/ldap/ld_session.h
+++ b/src/modules/ldap/ld_session.h
@@ -28,6 +28,7 @@
#ifndef LD_SESSION_H
#define LD_SESSION_H
+#include <sys/time.h>
#include <ldap.h>
#include "iniparser.h"
diff --git a/src/modules/seas/event_dispatcher.c b/src/modules/seas/event_dispatcher.c
index 05581d5..b9c720f 100644
--- a/src/modules/seas/event_dispatcher.c
+++ b/src/modules/seas/event_dispatcher.c
@@ -25,7 +25,7 @@
#include <string.h>/*strcmp,memset*/
#include <errno.h>/*errno*/
#include <unistd.h>/*close(),read(),pipe,fork,pid_t*/
-#include <sys/poll.h>/*poll*/
+#include <poll.h>/*poll*/
#include <signal.h>/*signal*/
#include <time.h>/*time*/
#include <string.h>/*memcmp*/
diff --git a/src/modules/tls/tls_server.c b/src/modules/tls/tls_server.c
index da04f08..5b713ec 100644
--- a/src/modules/tls/tls_server.c
+++ b/src/modules/tls/tls_server.c
@@ -26,7 +26,7 @@
*/
-#include <sys/poll.h>
+#include <poll.h>
#include <openssl/err.h>
#include <openssl/ssl.h>
#include "../../core/dprint.h"
diff --git a/utils/kamcmd/kamcmd.c b/utils/kamcmd/kamcmd.c
index 56124ca..08fb3b2 100644
--- a/utils/kamcmd/kamcmd.c
+++ b/utils/kamcmd/kamcmd.c
@@ -41,6 +41,7 @@
#include <netdb.h> /* gethostbyname */
#include <fcntl.h>
#include <time.h> /* time */
+#include <sys/time.h>
#ifdef USE_READLINE
#include <readline/readline.h>