Skip to content

Commit

Permalink
Add and fix #includes for more strict POSIX compliance
Browse files Browse the repository at this point in the history
- 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

(cherry picked from commit 4d48570)
  • Loading branch information
fabled committed Apr 28, 2017
1 parent c270da3 commit 51f214f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/tsend.c
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions src/modules/ldap/ld_session.h
Expand Up @@ -28,6 +28,7 @@
#ifndef LD_SESSION_H
#define LD_SESSION_H

#include <sys/time.h>
#include <ldap.h>

#include "iniparser.h"
Expand Down
2 changes: 1 addition & 1 deletion src/modules/seas/event_dispatcher.c
Expand Up @@ -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*/
Expand Down
2 changes: 1 addition & 1 deletion src/modules/tls/tls_server.c
Expand Up @@ -26,7 +26,7 @@
*/


#include <sys/poll.h>
#include <poll.h>
#include <openssl/err.h>
#include <openssl/ssl.h>
#include "../../core/dprint.h"
Expand Down
1 change: 1 addition & 0 deletions utils/kamcmd/kamcmd.c
Expand Up @@ -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>
Expand Down

0 comments on commit 51f214f

Please sign in to comment.