diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-01 01:58:20 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-01 01:58:20 +0000 |
commit | 4ec708d94989039ec736b39246082336700c065c (patch) | |
tree | 02f5a1eb88ae0b8e02c199343641d696809d68b6 | |
parent | 5370637c14a428d0046fe0158dd773ccd69e6f6b (diff) |
correctly fix build issues on Mac OSX Tiger by using a more generic means
for determining wheter poll and dlfcn functionality needs to be provided
git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-0@6707 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | Makefile | 13 | ||||
-rwxr-xr-x | include/asterisk/channel.h | 2 | ||||
-rwxr-xr-x | include/asterisk/io.h | 2 | ||||
-rwxr-xr-x | loader.c | 2 |
4 files changed, 13 insertions, 6 deletions
@@ -214,7 +214,6 @@ OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \ astmm.o enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o \ utils.o ifeq (${OSARCH},Darwin) -OBJS+=poll.o dlfcn.o ASTLINK=-Wl,-dynamic SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace else @@ -222,11 +221,19 @@ ASTLINK=-Wl,-E SOLINK=-shared -Xlinker -x endif +ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),) + OBJS+= poll.o + CFLAGS+=-DPOLLCOMPAT +endif + +ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),) + OBJS+= dhfcn.o + CFLAGS+=-DDLFCNCOMPAT +endif + CC=gcc INSTALL=install -CFLAGS+=$(shell if uname -r|grep -q 8.2.0 ; then echo " -DOSX10_4 " ; fi) - _all: all @echo " +--------- Asterisk Build Complete ---------+" @echo " + Asterisk has successfully been built, but +" diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index bd1674f08..6dbc70a65 100755 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -19,7 +19,7 @@ #include <asterisk/chanvars.h> #include <unistd.h> #include <setjmp.h> -#if !defined(OSX10_4) && defined(__APPLE__) +#ifdef POLLCOMPAT #include <asterisk/poll-compat.h> #else #include <sys/poll.h> diff --git a/include/asterisk/io.h b/include/asterisk/io.h index f775418a5..62e1f458f 100755 --- a/include/asterisk/io.h +++ b/include/asterisk/io.h @@ -14,7 +14,7 @@ #ifndef _IO_H #define _IO_H -#if !defined(OSX10_4) && defined(__APPLE__) +#ifdef POLLCOMPAT #include <asterisk/poll-compat.h> #else #include <sys/poll.h> /* For POLL* constants */ @@ -27,7 +27,7 @@ #include <asterisk/enum.h> #include <asterisk/rtp.h> #include <asterisk/lock.h> -#ifdef __APPLE__ +#ifdef DLFCNCOMPAT #include <asterisk/dlfcn-compat.h> #else #include <dlfcn.h> |