Browse Source

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
Timo Teräs 8 years ago
parent
commit
4d485707f7

+ 1 - 1
src/core/tsend.c

@@ -27,7 +27,7 @@
 
 
 #include <string.h>
 #include <string.h>
 #include <errno.h>
 #include <errno.h>
-#include <sys/poll.h>
+#include <poll.h>
 
 
 #include <sys/types.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/socket.h>

+ 1 - 0
src/modules/ldap/ld_session.h

@@ -28,6 +28,7 @@
 #ifndef LD_SESSION_H
 #ifndef LD_SESSION_H
 #define LD_SESSION_H
 #define LD_SESSION_H
 
 
+#include <sys/time.h>
 #include <ldap.h>
 #include <ldap.h>
 
 
 #include "iniparser.h"
 #include "iniparser.h"

+ 1 - 1
src/modules/seas/event_dispatcher.c

@@ -25,7 +25,7 @@
 #include <string.h>/*strcmp,memset*/
 #include <string.h>/*strcmp,memset*/
 #include <errno.h>/*errno*/
 #include <errno.h>/*errno*/
 #include <unistd.h>/*close(),read(),pipe,fork,pid_t*/
 #include <unistd.h>/*close(),read(),pipe,fork,pid_t*/
-#include <sys/poll.h>/*poll*/
+#include <poll.h>/*poll*/
 #include <signal.h>/*signal*/
 #include <signal.h>/*signal*/
 #include <time.h>/*time*/
 #include <time.h>/*time*/
 #include <string.h>/*memcmp*/
 #include <string.h>/*memcmp*/

+ 1 - 1
src/modules/tls/tls_server.c

@@ -26,7 +26,7 @@
  */
  */
 
 
 
 
-#include <sys/poll.h>
+#include <poll.h>
 #include <openssl/err.h>
 #include <openssl/err.h>
 #include <openssl/ssl.h>
 #include <openssl/ssl.h>
 #include "../../core/dprint.h"
 #include "../../core/dprint.h"

+ 1 - 0
utils/kamcmd/kamcmd.c

@@ -41,6 +41,7 @@
 #include <netdb.h> /* gethostbyname */
 #include <netdb.h> /* gethostbyname */
 #include <fcntl.h>
 #include <fcntl.h>
 #include <time.h> /* time */
 #include <time.h> /* time */
+#include <sys/time.h>
 
 
 #ifdef USE_READLINE
 #ifdef USE_READLINE
 #include <readline/readline.h>
 #include <readline/readline.h>