Index: Makefile =================================================================== RCS file: /usr/cvsroot/asterisk/Makefile,v retrieving revision 1.207 diff -u -r1.207 Makefile --- Makefile 19 Sep 2005 12:41:32 -0000 1.207 +++ Makefile 26 Sep 2005 16:46:05 -0000 @@ -297,6 +297,16 @@ utils.o plc.o jitterbuf.o dnsmgr.o devicestate.o \ netsock.o slinfactory.o ast_expr2.o ast_expr2f.o +ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),) + OBJS+= poll.o + ASTCFLAGS+=-DPOLLCOMPAT +endif + +ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),) + OBJS+= dhfcn.o + ASTCFLAGS+=-DDLFCNCOMPAT +endif + ifeq (${OSARCH},Linux) LIBS=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd else @@ -307,7 +317,6 @@ LIBS+=-lresolv ASTCFLAGS+=-D__Darwin__ AUDIO_LIBS=-framework CoreAudio - OBJS+=poll.o dlfcn.o ASTLINK=-Wl,-dynamic SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace else Index: loader.c =================================================================== RCS file: /usr/cvsroot/asterisk/loader.c,v retrieving revision 1.51 diff -u -r1.51 loader.c --- loader.c 14 Sep 2005 20:46:49 -0000 1.51 +++ loader.c 26 Sep 2005 16:46:14 -0000 @@ -43,7 +43,7 @@ #include "asterisk/enum.h" #include "asterisk/rtp.h" #include "asterisk/lock.h" -#ifdef __APPLE__ +#ifdef DLFCNCOMPAT #include "asterisk/dlfcn-compat.h" #else #include Index: include/asterisk/channel.h =================================================================== RCS file: /usr/cvsroot/asterisk/include/asterisk/channel.h,v retrieving revision 1.101 diff -u -r1.101 channel.h --- include/asterisk/channel.h 15 Sep 2005 16:34:39 -0000 1.101 +++ include/asterisk/channel.h 26 Sep 2005 16:46:17 -0000 @@ -31,7 +31,7 @@ #include #include -#if defined(__APPLE__) +#ifdef POLLCOMPAT #include "asterisk/poll-compat.h" #else #include Index: include/asterisk/io.h =================================================================== RCS file: /usr/cvsroot/asterisk/include/asterisk/io.h,v retrieving revision 1.8 diff -u -r1.8 io.h --- include/asterisk/io.h 30 Aug 2005 18:32:09 -0000 1.8 +++ include/asterisk/io.h 26 Sep 2005 16:46:18 -0000 @@ -23,7 +23,7 @@ #ifndef _ASTERISK_IO_H #define _ASTERISK_IO_H -#ifdef __APPLE__ +#ifdef POLLCOMPAT #include "asterisk/poll-compat.h" #else #include /* For POLL* constants */