]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix #include poll.h and sys/cdefs.h 64/2964/1
authorTimo Teräs <timo.teras@iki.fi>
Thu, 2 Jun 2016 19:53:39 +0000 (22:53 +0300)
committerJoshua Colp <jcolp@digium.com>
Wed, 8 Jun 2016 00:01:33 +0000 (19:01 -0500)
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 d5db6dd329a393bd0d863a2b6dce1dc656cf9860..bc9bce5ff526e17a79cfe86fb1ab220471430228 100644 (file)
@@ -68,7 +68,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 798e3d3ce57ea5c3ee5432ec0d2bb6dea6ab2936..a9e4eff442dcbfc56233b22acfc007ddd1e0c63d 100644 (file)
@@ -93,6 +93,7 @@
 
 #include "asterisk.h"
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <stdio.h>
 
index 83d3effe384146945781deacd0a9be5685ce5166..869dfe9ea9656a0b03b039e9a6d67730b5d9fc24 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "asterisk.h"
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <stdio.h>