From 5862c55451c31a5e579a552aadaab0e33f08ed63 Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Sat, 17 Nov 2007 03:07:06 +0000 Subject: use poll as detected by configure git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89355 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/channel.h | 7 +++---- include/asterisk/io.h | 6 +++--- main/Makefile | 8 +------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index b950883d5..4e61668c5 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -125,11 +125,10 @@ References: #include "asterisk/abstract_jb.h" -#include -#ifdef POLLCOMPAT -#include "asterisk/poll-compat.h" -#else +#ifdef HAVE_POLL #include +#else +#include "asterisk/poll-compat.h" #endif #if defined(__cplusplus) || defined(c_plusplus) diff --git a/include/asterisk/io.h b/include/asterisk/io.h index 8752a6d32..247d0de72 100644 --- a/include/asterisk/io.h +++ b/include/asterisk/io.h @@ -23,10 +23,10 @@ #ifndef _ASTERISK_IO_H #define _ASTERISK_IO_H -#ifdef POLLCOMPAT -#include "asterisk/poll-compat.h" -#else +#ifdef HAVE_POLL #include /* For POLL* constants */ +#else +#include "asterisk/poll-compat.h" #endif #if defined(__cplusplus) || defined(c_plusplus) diff --git a/main/Makefile b/main/Makefile index 25fb79ab5..a5e278b8f 100644 --- a/main/Makefile +++ b/main/Makefile @@ -41,14 +41,8 @@ OBJS+=say.o AST_LIBS += $(SSL_LIB) AST_LIBS += $(BKTR_LIB) -ifneq ($(findstring darwin,$(OSARCH)),) +ifeq ($(POLL_AVAILABLE),) OBJS+=poll.o - ASTCFLAGS+=-DPOLLCOMPAT -else - ifeq ($(wildcard /usr/include/sys/poll.h),) - OBJS+=poll.o - ASTCFLAGS+=-DPOLLCOMPAT - endif endif ifeq ($(wildcard /usr/include/dlfcn.h),) -- cgit v1.2.3