]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix #include poll.h and sys/cdefs.h 34/2934/1
authorTimo Teräs <timo.teras@iki.fi>
Thu, 2 Jun 2016 19:53:39 +0000 (22:53 +0300)
committerTimo Teräs <timo.teras@iki.fi>
Thu, 2 Jun 2016 19:53:39 +0000 (22:53 +0300)
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
include/asterisk/poll-compat.h
main/ast_expr2.c
main/ast_expr2.y

index 3eb6c96a2d3a0b4a87a0571f7e91534ea05bbad1..252ce914a276e5fc94f3d699ece11fd057e2443e 100644 (file)
@@ -70,7 +70,7 @@
 #endif
 
 #ifndef AST_POLL_COMPAT
-#include <sys/poll.h>
+#include <poll.h>
 #else
 #include "asterisk/poll-compat.h"
 #endif
index cbb61092514a6e3a4eb629b2fba53ce42ec1487c..72ac2c3e2f20f86df32bcf727e94de2a6e21738f 100644 (file)
@@ -83,7 +83,7 @@
 
 #ifndef AST_POLL_COMPAT
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #define ast_poll(a, b, c) poll(a, b, c)
 
index d41072d6e4b6867be14d2c1c0921d41ac0a24b95..c700b01d73f339b3cdada430c913bd13265ac72a 100644 (file)
@@ -94,6 +94,7 @@
 #define ASTMM_LIBC ASTMM_REDIRECT
 #include "asterisk.h"
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <stdio.h>
 
index 762e83d840f6b829ba9dac105506f0a821b0177f..df87bcc7f6bc001641bc9a3a62c18e859d178bdb 100644 (file)
@@ -15,6 +15,7 @@
 #define ASTMM_LIBC ASTMM_REDIRECT
 #include "asterisk.h"
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <stdio.h>