From: Timo Teräs Date: Thu, 2 Jun 2016 19:53:39 +0000 (+0300) Subject: Fix #include poll.h and sys/cdefs.h X-Git-Tag: 11.23.0-rc1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1716830c5af36c46d6c599cd023d0f43074467e9;p=thirdparty%2Fasterisk.git 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 --- 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