From 06e6b25ca44f1612b599b7f89d33367be9bd72b5 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Wed, 14 Sep 2005 01:10:20 +0000 Subject: more BSD portability fixes (issue #5155) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6578 f38db490-d61c-443f-a65b-d21fe96a405b --- Makefile | 4 ++-- channels/Makefile | 8 +++++++- channels/chan_zap.c | 5 +++++ utils/streamplayer.c | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index daffa8fc9..72e198fde 100755 --- a/Makefile +++ b/Makefile @@ -235,7 +235,7 @@ ifeq (${OSARCH},FreeBSD) ASTCFLAGS+=$(shell if test ${BSDVERSION} -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) LIBS+=$(shell if test ${BSDVERSION} -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi) ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/spandsp),) - ASTCFLAGS+=" -I$(CROSS_COMPILE_TARGET)/usr/local/include/spandsp" + ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include/spandsp endif MPG123TARG=freebsd endif # FreeBSD @@ -255,7 +255,7 @@ ifeq (${OSARCH},SunOS) INCLUDE+=-Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include endif -ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h),) +ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),) ASTCFLAGS+=-DZAPTEL_OPTIMIZATIONS endif diff --git a/channels/Makefile b/channels/Makefile index 2bfd2308a..7189416bd 100755 --- a/channels/Makefile +++ b/channels/Makefile @@ -92,7 +92,13 @@ ifneq ($(wildcard alsa-monitor.h),) ALSA_SRC+=alsa-monitor.h endif -ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h),) +ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),) + ifeq (${OSARCH},NetBSD) + SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/pkg/lib + endif + ifeq (${OSARCH},FreeBSD) + SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib + endif CFLAGS+=-DIAX_TRUNKING CHANNEL_LIBS+=chan_zap.so endif diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 44b3fe1e8..d403bfbcc 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -13,7 +13,12 @@ #include #include +#ifdef __NetBSD__ +#include +#include +#else #include +#endif #include #include #if !defined(SOLARIS) && !defined(__FreeBSD__) diff --git a/utils/streamplayer.c b/utils/streamplayer.c index 5ab7f70ad..1a8309887 100755 --- a/utils/streamplayer.c +++ b/utils/streamplayer.c @@ -20,7 +20,7 @@ #include #include #include -#if defined(__FreeBSD__) || defined(__OpenBSD__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) #include #endif #include -- cgit v1.2.3