mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-03 04:16:43 +00:00
use a more generic means to decide whether we need to provide poll/dlfcn functionality (issue #5297)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
11
Makefile
11
Makefile
@@ -301,6 +301,16 @@ OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
|
|||||||
utils.o plc.o jitterbuf.o dnsmgr.o devicestate.o \
|
utils.o plc.o jitterbuf.o dnsmgr.o devicestate.o \
|
||||||
netsock.o slinfactory.o ast_expr2.o ast_expr2f.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)
|
ifeq (${OSARCH},Linux)
|
||||||
LIBS=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd
|
LIBS=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd
|
||||||
else
|
else
|
||||||
@@ -311,7 +321,6 @@ ifeq (${OSARCH},Darwin)
|
|||||||
LIBS+=-lresolv
|
LIBS+=-lresolv
|
||||||
ASTCFLAGS+=-D__Darwin__
|
ASTCFLAGS+=-D__Darwin__
|
||||||
AUDIO_LIBS=-framework CoreAudio
|
AUDIO_LIBS=-framework CoreAudio
|
||||||
OBJS+=poll.o dlfcn.o
|
|
||||||
ASTLINK=-Wl,-dynamic
|
ASTLINK=-Wl,-dynamic
|
||||||
SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
|
SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#if defined(__APPLE__)
|
#ifdef POLLCOMPAT
|
||||||
#include "asterisk/poll-compat.h"
|
#include "asterisk/poll-compat.h"
|
||||||
#else
|
#else
|
||||||
#include <sys/poll.h>
|
#include <sys/poll.h>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#ifndef _ASTERISK_IO_H
|
#ifndef _ASTERISK_IO_H
|
||||||
#define _ASTERISK_IO_H
|
#define _ASTERISK_IO_H
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef POLLCOMPAT
|
||||||
#include "asterisk/poll-compat.h"
|
#include "asterisk/poll-compat.h"
|
||||||
#else
|
#else
|
||||||
#include <sys/poll.h> /* For POLL* constants */
|
#include <sys/poll.h> /* For POLL* constants */
|
||||||
|
|||||||
2
loader.c
2
loader.c
@@ -43,7 +43,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
#include "asterisk/enum.h"
|
#include "asterisk/enum.h"
|
||||||
#include "asterisk/rtp.h"
|
#include "asterisk/rtp.h"
|
||||||
#include "asterisk/lock.h"
|
#include "asterisk/lock.h"
|
||||||
#ifdef __APPLE__
|
#ifdef DLFCNCOMPAT
|
||||||
#include "asterisk/dlfcn-compat.h"
|
#include "asterisk/dlfcn-compat.h"
|
||||||
#else
|
#else
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user