more BSD portability fixes (issue )

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2-netsec
Kevin P. Fleming 20 years ago
parent 67584e21c8
commit 72437b1dba

@ -235,7 +235,7 @@ ifeq (${OSARCH},FreeBSD)
ASTCFLAGS+=$(shell if test ${BSDVERSION} -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) 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) LIBS+=$(shell if test ${BSDVERSION} -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/spandsp),) 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 endif
MPG123TARG=freebsd MPG123TARG=freebsd
endif # FreeBSD endif # FreeBSD
@ -255,7 +255,7 @@ ifeq (${OSARCH},SunOS)
INCLUDE+=-Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include INCLUDE+=-Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
endif 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 ASTCFLAGS+=-DZAPTEL_OPTIMIZATIONS
endif endif

@ -92,7 +92,13 @@ ifneq ($(wildcard alsa-monitor.h),)
ALSA_SRC+=alsa-monitor.h ALSA_SRC+=alsa-monitor.h
endif 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 CFLAGS+=-DIAX_TRUNKING
CHANNEL_LIBS+=chan_zap.so CHANNEL_LIBS+=chan_zap.so
endif endif

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

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

Loading…
Cancel
Save