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:
parent
f68285950b
commit
44aff84c2e
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 \
|
||||
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
|
||||
|
@ -311,7 +321,6 @@ ifeq (${OSARCH},Darwin)
|
|||
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
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include <unistd.h>
|
||||
#include <setjmp.h>
|
||||
#if defined(__APPLE__)
|
||||
#ifdef POLLCOMPAT
|
||||
#include "asterisk/poll-compat.h"
|
||||
#else
|
||||
#include <sys/poll.h>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#ifndef _ASTERISK_IO_H
|
||||
#define _ASTERISK_IO_H
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifdef POLLCOMPAT
|
||||
#include "asterisk/poll-compat.h"
|
||||
#else
|
||||
#include <sys/poll.h> /* For POLL* constants */
|
||||
|
|
Loading…
Reference in New Issue