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
This commit is contained in:
Timo Teräs
2016-06-02 22:53:39 +03:00
parent 48843a107d
commit 9c1d95e873
4 changed files with 4 additions and 2 deletions

View File

@@ -70,7 +70,7 @@
#endif
#ifndef AST_POLL_COMPAT
#include <sys/poll.h>
#include <poll.h>
#else
#include "asterisk/poll-compat.h"
#endif

View 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)

View File

@@ -94,6 +94,7 @@
#define ASTMM_LIBC ASTMM_REDIRECT
#include "asterisk.h"
#include <sys/cdefs.h>
#include <sys/types.h>
#include <stdio.h>

View File

@@ -15,6 +15,7 @@
#define ASTMM_LIBC ASTMM_REDIRECT
#include "asterisk.h"
#include <sys/cdefs.h>
#include <sys/types.h>
#include <stdio.h>