use poll as detected by configure
authorLuigi Rizzo <rizzo@icir.org>
Sat, 17 Nov 2007 03:07:06 +0000 (03:07 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Sat, 17 Nov 2007 03:07:06 +0000 (03:07 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89355 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/channel.h
include/asterisk/io.h
main/Makefile

index b950883..4e61668 100644 (file)
@@ -125,11 +125,10 @@ References:
 
 #include "asterisk/abstract_jb.h"
 
-#include <unistd.h>
-#ifdef POLLCOMPAT 
-#include "asterisk/poll-compat.h"
-#else
+#ifdef HAVE_POLL 
 #include <sys/poll.h>
+#else
+#include "asterisk/poll-compat.h"
 #endif
 
 #if defined(__cplusplus) || defined(c_plusplus)
index 8752a6d..247d0de 100644 (file)
 #ifndef _ASTERISK_IO_H
 #define _ASTERISK_IO_H
 
-#ifdef POLLCOMPAT
-#include "asterisk/poll-compat.h"
-#else
+#ifdef HAVE_POLL
 #include <sys/poll.h>          /* For POLL* constants */
+#else
+#include "asterisk/poll-compat.h"
 #endif
 
 #if defined(__cplusplus) || defined(c_plusplus)
index 25fb79a..a5e278b 100644 (file)
@@ -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),)