[Asterisk-Dev] FreeBSD port
Andreas Wrede
andreas at planix.com
Sat Sep 13 18:42:19 MST 2003
On Sat, 13 Sep 2003, Tilghman Lesher wrote:
> On Saturday 13 September 2003 15:10, Brad Waite wrote:
> > I've perused the list archives and there's several mentions of
> > successful ports to FreeBSD. Where can I get the patches/ports?
>
> Didn't take me much to get it to compile and run on FreeBSD (patch
> attached). It may, however, take a bit more effort to get everything to
> work correctly. Obviously, I've tried no calls.
Attached is a patch for asterisk on NetBSD -current, ie. NetBSD
pre-2.0 (1.6Z in fact), not the 1.6 release. With the patch applied, I
can make and receive call on the console (chan_oss), as well as via
chan_h323 and chan_iax. Using IAX to 'switch' in another (Linux-based)
asterisk server also works. The patch contains a couple of NetBSD-isms
which I don't have time to generalize at the movement.
Hope this helps someone..
--
- aew
-------------- next part --------------
? cscope.out
? cvsupdate.log
? d1
Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/Makefile,v
retrieving revision 1.24
diff -u -u -r1.24 Makefile
--- Makefile 19 Aug 2003 16:42:30 -0000 1.24
+++ Makefile 14 Sep 2003 01:54:26 -0000
@@ -21,6 +21,10 @@
ifeq (${OSARCH},Linux)
PROC=$(shell uname -m)
endif
+ifeq (${OSARCH},NetBSD)
+PROC=$(shell uname -m)
+endif
+
# Pentium Pro Optimize
#PROC=i686
@@ -93,7 +97,12 @@
MODULES_DIR=$(ASTLIBDIR)/modules
AGI_DIR=$(ASTVARLIBDIR)/agi-bin
-INCLUDE=-Iinclude -I../include
+ifeq (${OSARCH},Linux)
+INCLUDE=-Iinclude -I../include
+endif
+ifeq (${OSARCH},NetBSD)
+INCLUDE=-Iinclude -I../include -I/usr/pkg/include/bind -I/usr/pkg/include
+endif
CFLAGS=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
CFLAGS+=$(OPTIMIZE)
CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
@@ -129,17 +138,23 @@
CFLAGS+=# -fomit-frame-pointer
SUBDIRS=res channels pbx apps codecs formats agi cdr astman
ifeq (${OSARCH},Linux)
-LIBS=-ldl
+LIBS=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd
+MAKE=make
+CC=gcc
+INSTALL=install
+endif
+ifeq (${OSARCH},NetBSD)
+LIBS=-lpthread -lossaudio -L/usr/pkg/lib -lncurses -lm -lbind
+MAKE=gmake
+CC=cc
+INSTALL=install -c
endif
-LIBS+=-lpthread -lncurses -lm -lresolv #-lnjamd
OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
translate.o file.o say.o pbx.o cli.o md5.o term.o \
ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \
cdr.o tdd.o acl.o rtp.o manager.o asterisk.o ast_expr.o \
dsp.o chanvars.o indications.o autoservice.o db.o privacy.o \
astmm.o enum.o srv.o
-CC=gcc
-INSTALL=install
_all: all
@echo " +--------- Asterisk Build Complete ---------+"
@@ -215,7 +230,7 @@
mkdir -p $(ASTVARLIBDIR)/sounds/digits
for x in sounds/digits/*.gsm; do \
if grep -q "^%`basename $$x`%" sounds.txt; then \
- install $$x $(ASTVARLIBDIR)/sounds/digits ; \
+ ${INSTALL} $$x $(ASTVARLIBDIR)/sounds/digits ; \
else \
echo "No description for $$x"; \
exit 1; \
@@ -223,7 +238,7 @@
done
for x in sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-*; do \
if grep -q "^%`basename $$x`%" sounds.txt; then \
- install $$x $(ASTVARLIBDIR)/sounds ; \
+ ${INSTALL} $$x $(ASTVARLIBDIR)/sounds ; \
else \
echo "No description for $$x"; \
exit 1; \
@@ -232,7 +247,7 @@
mkdir -p $(ASTVARLIBDIR)/mohmp3
mkdir -p $(ASTVARLIBDIR)/images
for x in images/*.jpg; do \
- install $$x $(ASTVARLIBDIR)/images ; \
+ ${INSTALL} $$x $(ASTVARLIBDIR)/images ; \
done
mkdir -p $(AGI_DIR)
@@ -253,12 +268,12 @@
mkdir -p $(ASTSBINDIR)
mkdir -p $(ASTVARRUNDIR)
mkdir -p $(ASTSPOOLDIR)/voicemail
- install -m 755 asterisk $(ASTSBINDIR)/
- install -m 755 astgenkey $(ASTSBINDIR)/
- install -m 755 safe_asterisk $(ASTSBINDIR)/
+ ${INSTALL} -m 755 asterisk $(ASTSBINDIR)/
+ ${INSTALL} -m 755 astgenkey $(ASTSBINDIR)/
+ ${INSTALL} -m 755 safe_asterisk $(ASTSBINDIR)/
for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
- install -d $(ASTHEADERDIR)
- install include/asterisk/*.h $(ASTHEADERDIR)
+ ${INSTALL} -d $(ASTHEADERDIR)
+ ${INSTALL} include/asterisk/*.h $(ASTHEADERDIR)
rm -f $(ASTVARLIBDIR)/sounds/vm
rm -f $(ASTVARLIBDIR)/sounds/voicemail
if [ ! -h $(ASTSPOOLDIR)/vm ] && [ -d $(ASTSPOOLDIR)/vm ]; then \
@@ -273,7 +288,7 @@
mkdir -p $(ASTVARLIBDIR)/sounds
mkdir -p $(ASTLOGDIR)/cdr-csv
mkdir -p $(ASTVARLIBDIR)/keys
- install -m 644 keys/iaxtel.pub $(ASTVARLIBDIR)/keys
+ ${INSTALL} -m 644 keys/iaxtel.pub $(ASTVARLIBDIR)/keys
( cd $(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/vm . )
( cd $(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/voicemail . )
@echo " +---- Asterisk Installation Complete -------+"
@@ -306,7 +321,7 @@
mkdir -p $(ASTETCDIR)
for x in configs/*.adsi; do \
if ! [ -f $(ASTETCDIRX)/$$x ]; then \
- install -m 644 $$x $(ASTETCDIR)/`basename $$x` ; \
+ ${INSTALL} -m 644 $$x $(ASTETCDIR)/`basename $$x` ; \
fi ; \
done
@@ -316,7 +331,7 @@
if [ -f $(ASTETCDIR)/`basename $$x .sample` ]; then \
mv -f $(ASTETCDIR)/`basename $$x .sample` $(ASTETCDIR)/`basename $$x .sample`.old ; \
fi ; \
- install $$x $(ASTETCDIR)/`basename $$x .sample` ;\
+ ${INSTALL} $$x $(ASTETCDIR)/`basename $$x .sample` ;\
done
echo "[directories]" > $(ASTETCDIR)/asterisk.conf
echo "astetcdir => $(ASTETCDIR)" >> $(ASTETCDIR)/asterisk.conf
@@ -328,14 +343,14 @@
echo "astlogdir => $(ASTLOGDIR)" >> $(ASTETCDIR)/asterisk.conf
for x in sounds/demo-*; do \
if grep -q "^%`basename $$x`%" sounds.txt; then \
- install $$x $(ASTVARLIBDIR)/sounds ; \
+ ${INSTALL} $$x $(ASTVARLIBDIR)/sounds ; \
else \
echo "No description for $$x"; \
exit 1; \
fi; \
done
for x in sounds/*.mp3; do \
- install $$x $(ASTVARLIBDIR)/mohmp3 ; \
+ ${INSTALL} $$x $(ASTVARLIBDIR)/mohmp3 ; \
done
mkdir -p $(ASTSPOOLDIR)/voicemail/default/1234/INBOX
:> $(ASTVARLIBDIR)/sounds/voicemail/default/1234/unavail.gsm
@@ -351,10 +366,10 @@
@[ -d $(HTTPDIR) ] || ( echo "No HTTP directory" && exit 1 )
@[ -d $(HTTPDIR)/html ] || ( echo "No http directory" && exit 1 )
@[ -d $(HTTPDIR)/cgi-bin ] || ( echo "No cgi-bin directory" && exit 1 )
- install -m 4755 -o root -g root vmail.cgi $(HTTPDIR)/cgi-bin/vmail.cgi
+ ${INSTALL} -m 4755 -o root -g root vmail.cgi $(HTTPDIR)/cgi-bin/vmail.cgi
mkdir -p $(HTTPDIR)/html/_asterisk
for x in images/*.gif; do \
- install -m 644 $$x $(HTTPDIR)/html/_asterisk/; \
+ ${INSTALL} -m 644 $$x $(HTTPDIR)/html/_asterisk/; \
done
@echo " +--------- Asterisk Web Voicemail ----------+"
@echo " + +"
@@ -390,10 +405,10 @@
config:
if [ -d /etc/rc.d/init.d ]; then \
- install -m 755 init.asterisk /etc/rc.d/init.d/asterisk; \
+ ${INSTALL} -m 755 init.asterisk /etc/rc.d/init.d/asterisk; \
/sbin/chkconfig --add asterisk; \
elif [ -d /etc/init.d ]; then \
- install -m 755 init.asterisk /etc/init.d/asterisk; \
+ ${INSTALL} -m 755 init.asterisk /etc/init.d/asterisk; \
fi
Index: apps/app_voicemail2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail2.c,v
retrieving revision 1.42
diff -u -u -r1.42 app_voicemail2.c
--- apps/app_voicemail2.c 16 Aug 2003 17:40:39 -0000 1.42
+++ apps/app_voicemail2.c 14 Sep 2003 01:54:28 -0000
@@ -42,6 +42,17 @@
#include "../asterisk.h"
#include "../astconf.h"
+#ifndef strdupa
+#define strdupa(s) \
+ (__extension__ \
+ ({ \
+ __const char *__old = (s); \
+ size_t __len = strlen (__old) + 1; \
+ char *__new = (char *) __builtin_alloca (__len); \
+ (char *) memcpy (__new, __old, __len); \
+ }))
+#endif
+
#define COMMAND_TIMEOUT 5000
#define VOICEMAIL_CONFIG "voicemail.conf"
Index: channels/Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/Makefile,v
retrieving revision 1.9
diff -u -u -r1.9 Makefile
--- channels/Makefile 19 Aug 2003 16:42:30 -0000 1.9
+++ channels/Makefile 14 Sep 2003 01:54:28 -0000
@@ -11,6 +11,22 @@
# the GNU General Public License
#
+ifndef OSTYPE
+OSTYPE := $(shell uname -s)
+endif
+
+ifeq ($(OSTYPE),Linux)
+OSTYPE := linux
+CFLAGS += -DP_LINUX
+EXTARLIBS=-ldl
+endif
+
+ifeq ($(OSTYPE),NetBSD)
+OSRELEASE := $(shell /sbin/sysctl -n kern.osrevision)
+CFLAGS += -DP_NETBSD=$(OSRELEASE)
+EXTARLIBS=
+endif
+
OSARCH=$(shell uname -s)
CHANNEL_LIBS=chan_modem.so chan_iax.so chan_sip.so \
@@ -108,7 +124,7 @@
chan_alsa.so: chan_alsa.o
- $(CC) -shared -Xlinker -x -o $@ $< -lasound -lm -ldl
+ $(CC) -shared -Xlinker -x -o $@ $< -lasound -lm $(EXTRALIBS)
chan_nbs.so: chan_nbs.o
$(CC) -shared -Xlinker -x -o $@ $< -lnbs
@@ -117,10 +133,10 @@
$(CXX) -c $(CFLAGS) -o $@ chan_vpb.c
chan_vpb.so: chan_vpb.o
- $(CXX) -shared -Xlinker -x -o $@ $< -lvpb -lpthread -lm -ldl
+ $(CXX) -shared -Xlinker -x -o $@ $< -lvpb -lpthread -lm $(EXTRALIBS)
chan_h323.so: chan_h323.o h323/libchanh323.a
- $(CC) -shared -Xlinker -x -o $@ $< h323/libchanh323.a -L$(PWLIBDIR)/lib -lpt_linux_x86_r -L$(OPENH323DIR)/lib -lh323_linux_x86_r -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
+ $(CC) -shared -Xlinker -x -o $@ $< h323/libchanh323.a -L$(PWLIBDIR)/lib -lpt_$(OSTYPE)_x86_r -L$(OPENH323DIR)/lib -lh323_$(OSTYPE)_x86_r -L/usr/lib -lpthread $(EXTRALIBS) -lcrypto -lssl -L/usr/pkg/lib -lexpat
#chan_modem.so : chan_modem.o
Index: channels/chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_h323.c,v
retrieving revision 1.1
diff -u -u -r1.1 chan_h323.c
--- channels/chan_h323.c 16 Aug 2003 17:00:22 -0000 1.1
+++ channels/chan_h323.c 14 Sep 2003 01:54:28 -0000
@@ -28,7 +28,12 @@
#include <stdio.h>
#include <pthread.h>
+#include <signal.h>
#include <string.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <unistd.h>
+
#include <asterisk/lock.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
@@ -48,11 +53,11 @@
#include <sys/socket.h>
#include <net/if.h>
#include <errno.h>
-#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <netdb.h>
#include <sys/signal.h>
+#include <netinet/in_systm.h>
#include <netinet/ip.h>
Index: channels/chan_iax.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax.c,v
retrieving revision 1.12
diff -u -u -r1.12 chan_iax.c
--- channels/chan_iax.c 16 Aug 2003 05:10:35 -0000 1.12
+++ channels/chan_iax.c 14 Sep 2003 01:54:30 -0000
@@ -35,7 +35,7 @@
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <sys/time.h>
-#include <sys/signal.h>
+#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -4335,6 +4335,7 @@
}
ast_mutex_unlock(&peerl.lock);
} else {
+/*AEW ast_pthread_mutex_unlock(&peerl.lock); */
ast_mutex_unlock(&peerl.lock);
peer = malloc(sizeof(struct iax_peer));
memset(peer, 0, sizeof(struct iax_peer));
Index: channels/chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.38
diff -u -u -r1.38 chan_iax2.c
--- channels/chan_iax2.c 16 Aug 2003 05:10:35 -0000 1.38
+++ channels/chan_iax2.c 14 Sep 2003 01:54:33 -0000
@@ -37,7 +37,7 @@
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <sys/time.h>
-#include <sys/signal.h>
+#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -5600,6 +5600,7 @@
ast_mutex_init(&iaxq.lock);
ast_mutex_init(&userl.lock);
ast_mutex_init(&peerl.lock);
+ ast_mutex_init(&dpcache_lock);
ast_cli_register(&cli_show_users);
ast_cli_register(&cli_show_channels);
Index: channels/chan_oss.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_oss.c,v
retrieving revision 1.6
diff -u -u -r1.6 chan_oss.c
--- channels/chan_oss.c 13 Aug 2003 15:25:16 -0000 1.6
+++ channels/chan_oss.c 14 Sep 2003 01:54:33 -0000
@@ -35,17 +35,16 @@
#include <stdio.h>
#ifdef __linux
#include <linux/soundcard.h>
+#define DEV_DSP "/dev/dsp"
#else
#include <soundcard.h>
+#define DEV_DSP "/dev/sound"
#endif
#include "busy.h"
#include "ringtone.h"
#include "ring10.h"
#include "answer.h"
-/* Which device to use */
-#define DEV_DSP "/dev/dsp"
-
/* Lets use 160 sample frames, just like GSM. */
#define FRAME_SIZE 160
@@ -364,7 +363,7 @@
return 0;
readmode = 0;
if (force || time_has_passed()) {
- ioctl(sounddev, SNDCTL_DSP_RESET);
+ ioctl(sounddev, SNDCTL_DSP_RESET, NULL);
/* Keep the same fd reserved by closing the sound device and copying stdin at the same
time. */
/* dup2(0, sound); */
@@ -394,7 +393,7 @@
return 0;
readmode = -1;
if (force || time_has_passed()) {
- ioctl(sounddev, SNDCTL_DSP_RESET);
+ ioctl(sounddev, SNDCTL_DSP_RESET, NULL);
close(sounddev);
/* dup2(0, sound); */
fd = open(DEV_DSP, O_RDONLY | O_NONBLOCK);
Index: channels/h323/Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/Makefile,v
retrieving revision 1.8
diff -u -u -r1.8 Makefile
--- channels/h323/Makefile 16 Aug 2003 16:55:19 -0000 1.8
+++ channels/h323/Makefile 14 Sep 2003 01:54:33 -0000
@@ -16,6 +16,21 @@
ASTETCDIR=/etc/asterisk
endif
+ifndef OSTYPE
+OSTYPE := $(shell uname -s)
+endif
+
+ifeq ($(OSTYPE),Linux)
+OSTYPE := linux
+CFLAGS += -DP_LINUX
+endif
+
+ifeq ($(OSTYPE),NetBSD)
+OSRELEASE := $(shell /sbin/sysctl -n kern.osrevision)
+CFLAGS += -DP_NETBSD=$(OSRELEASE)
+endif
+
+
# Uncomment if u want to attempt to include the G.729 stuff
# This is a quick fix to work around the missing H323Capability
# in Open H.323. As of Open H.323 1.12.0 the H323Capability for
@@ -32,9 +47,9 @@
#
# Only change below if you know WTF your doing
#
-CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
+# CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
CFLAGS += -pipe -Wall -fPIC -Wmissing-prototypes -Wmissing-declarations
-CFLAGS += -DP_LINUX -D_REENTRANT -D_GNU_SOURCE
+CFLAGS += -D_REENTRANT -D_GNU_SOURCE
CFLAGS += -DP_HAS_SEMAPHORES -DP_SSL -DP_PTHREADS
CFLAGS += -DPHAS_TEMPLATES -DPTRACING -DP_USE_PRAGMA
CFLAGS += -I../../include
@@ -46,7 +61,7 @@
install: all
- install -m 755 chan_h323.so $(ASTERISKDIR)
+ install -c -m 755 chan_h323.so $(ASTERISKDIR)
@echo " + ---- chan_h323 Installation Complete ----- +"
@echo " + +"
@echo " + chan_h323 has successfully been installed. +"
@@ -64,7 +79,7 @@
if [ -f $(ASTETCDIR)/h323.conf ]; then \
mv -f $(ASTETCDIR)/h323.conf $(ASTETCDIR)/h323.conf.old ; \
fi ;
- install h323.conf.sample $(ASTETCDIR)/h323.conf
+ install -c h323.conf.sample $(ASTETCDIR)/h323.conf
ast_h323.o: ast_h323.cpp
@@ -74,13 +89,13 @@
ar cr libchanh323.a ast_h323.o
chan_h323.so:
- g++ -g -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib -lpt_linux_x86_r -L$(OPENH323DIR)/lib -lh323_linux_x86_r -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
+ g++ -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib -lpt_linux_x86_r -L$(OPENH323DIR)/lib -lh323_linux_x86_r -L/usr/lib -lpthread -ldl -lcrypto -lssl -L/usr/pkg/lib -lexpat
chan_h323_d.so: chan_h323.o ast_h323.o
- g++ -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib -lpt_linux_x86_d -L$(OPENH323DIR)/lib -lh323_linux_x86_d -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
+ g++ -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib -lpt_$(OSTYPE)_x86_d -L$(OPENH323DIR)/lib -lh323_$(OSTYPE)_x86_d -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
chan_h323_s.so: chan_h323.o ast_h323.o
- g++ -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib -lpt_linux_x86_r_s -L$(OPENH323DIR)/lib -lh323_linux_x86_r_s -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
+ g++ -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib -lpt_$(OSTYPE)_x86_r_s -L$(OPENH323DIR)/lib -lh323_$(OSTYPE)_x86_r_s -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
clean:
rm -f *.o *.so core.*
Index: channels/h323/ast_h323.h
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/ast_h323.h,v
retrieving revision 1.8
diff -u -u -r1.8 ast_h323.h
--- channels/h323/ast_h323.h 14 Aug 2003 08:02:33 -0000 1.8
+++ channels/h323/ast_h323.h 14 Sep 2003 01:54:33 -0000
@@ -31,6 +31,8 @@
#include <h323pdu.h>
#include <mediafmt.h>
#include <lid.h>
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
#include <list>
#include <string>
Index: channels/h323/chan_h323.h
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/chan_h323.h,v
retrieving revision 1.8
diff -u -u -r1.8 chan_h323.h
--- channels/h323/chan_h323.h 23 Jul 2003 02:27:44 -0000 1.8
+++ channels/h323/chan_h323.h 14 Sep 2003 01:54:33 -0000
@@ -27,6 +27,12 @@
#include <arpa/inet.h>
+#ifdef P_NETBSD
+#include <netinet/ip.h>
+#define IPTOS_LOWCOST 0x02
+#define IPTOS_MINCOST IPTOS_LOWCOST
+#endif
+
static struct sockaddr_in bindaddr;
/* structure to hold the valid asterisk users */
Index: codecs/lpc10/lpc10.h
===================================================================
RCS file: /usr/cvsroot/asterisk/codecs/lpc10/lpc10.h,v
retrieving revision 1.2
diff -u -u -r1.2 lpc10.h
--- codecs/lpc10/lpc10.h 23 Apr 2003 19:13:35 -0000 1.2
+++ codecs/lpc10/lpc10.h 14 Sep 2003 01:54:33 -0000
@@ -35,7 +35,7 @@
*/
-#if defined(unix) || defined(__unix__)
+#if defined(unix) || defined(__unix__) || defined(__NetBSD__)
typedef short INT16;
typedef int INT32;
#endif
Index: include/asterisk/channel.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/channel.h,v
retrieving revision 1.17
diff -u -u -r1.17 channel.h
--- include/asterisk/channel.h 13 Aug 2003 15:25:16 -0000 1.17
+++ include/asterisk/channel.h 14 Sep 2003 01:54:34 -0000
@@ -14,6 +14,10 @@
#ifndef _ASTERISK_CHANNEL_H
#define _ASTERISK_CHANNEL_H
+#include <sys/types.h>
+#include <sys/time.h>
+#include <unistd.h>
+
#include <asterisk/frame.h>
#include <asterisk/sched.h>
#include <asterisk/chanvars.h>
Index: include/asterisk/frame.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/frame.h,v
retrieving revision 1.11
diff -u -u -r1.11 frame.h
--- include/asterisk/frame.h 19 Aug 2003 06:06:50 -0000 1.11
+++ include/asterisk/frame.h 14 Sep 2003 01:54:34 -0000
@@ -26,7 +26,7 @@
#ifndef __BYTE_ORDER
#ifdef __linux__
#include <endian.h>
-#elif defined(__OpenBSD__)
+#elif defined(__OpenBSD__) || defined(__NetBSD__)
#include <machine/endian.h>
#define __BYTE_ORDER BYTE_ORDER
#define __LITTLE_ENDIAN LITTLE_ENDIAN
More information about the asterisk-dev
mailing list