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: https://origsvn.digium.com/svn/asterisk/branches/v1-0@6707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
Russell Bryant 20 years ago
parent afdd1c5512
commit 6b36952664

@ -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 +"

@ -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>

@ -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>

Loading…
Cancel
Save