dect
/
asterisk
Archived
13
0
Fork 0

more BSD portability fixes (issue #5155)

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6578 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
kpfleming 2005-09-14 01:10:20 +00:00
parent 664813210f
commit 06e6b25ca4
4 changed files with 15 additions and 4 deletions

View File

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

View File

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

View File

@ -13,7 +13,12 @@
#include <stdio.h>
#include <string.h>
#ifdef __NetBSD__
#include <pthread.h>
#include <signal.h>
#else
#include <sys/signal.h>
#endif
#include <errno.h>
#include <stdlib.h>
#if !defined(SOLARIS) && !defined(__FreeBSD__)

View File

@ -20,7 +20,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#include <netinet/in.h>
#endif
#include <sys/time.h>