From 1716830c5af36c46d6c599cd023d0f43074467e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timo=20Ter=C3=A4s?= Date: Thu, 2 Jun 2016 22:53:39 +0300 Subject: [PATCH] Fix #include poll.h and sys/cdefs.h POSIX defines poll.h, sys/poll.h should not be used at is c-library internal header which may or may not exist. Notable in musl it generates warning of being incorrect. And add explict include of sys/cdefs.h where needed. Change-Id: I142930df53fe7585a06b854b6faddc5301e024be --- include/asterisk/compat.h | 2 +- include/asterisk/poll-compat.h | 2 +- main/ast_expr2.c | 1 + main/ast_expr2.y | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/asterisk/compat.h b/include/asterisk/compat.h index d5db6dd329..bc9bce5ff5 100644 --- a/include/asterisk/compat.h +++ b/include/asterisk/compat.h @@ -68,7 +68,7 @@ #endif #ifndef AST_POLL_COMPAT -#include +#include #else #include "asterisk/poll-compat.h" #endif diff --git a/include/asterisk/poll-compat.h b/include/asterisk/poll-compat.h index cbb6109251..72ac2c3e2f 100644 --- a/include/asterisk/poll-compat.h +++ b/include/asterisk/poll-compat.h @@ -83,7 +83,7 @@ #ifndef AST_POLL_COMPAT -#include +#include #define ast_poll(a, b, c) poll(a, b, c) diff --git a/main/ast_expr2.c b/main/ast_expr2.c index 798e3d3ce5..a9e4eff442 100644 --- a/main/ast_expr2.c +++ b/main/ast_expr2.c @@ -93,6 +93,7 @@ #include "asterisk.h" +#include #include #include diff --git a/main/ast_expr2.y b/main/ast_expr2.y index 83d3effe38..869dfe9ea9 100644 --- a/main/ast_expr2.y +++ b/main/ast_expr2.y @@ -14,6 +14,7 @@ #include "asterisk.h" +#include #include #include -- 2.47.2