Index: Makefile =================================================================== RCS file: /usr/cvsroot/asterisk/Makefile,v retrieving revision 1.75.2.2 diff -u -r1.75.2.2 Makefile --- Makefile 31 Mar 2004 22:43:10 -0000 1.75.2.2 +++ Makefile 17 May 2004 20:14:14 -0000 @@ -23,8 +23,13 @@ else ifeq (${OSARCH},FreeBSD) PROC=$(shell uname -m) +else +ifeq (${OSARCH},OpenBSD) +PROC=$(shell uname -m) endif endif +endif + # Pentium Pro Optimize #PROC=i686 @@ -102,7 +107,7 @@ MODULES_DIR=$(ASTLIBDIR)/modules AGI_DIR=$(ASTVARLIBDIR)/agi-bin -INCLUDE=-Iinclude -I../include +INCLUDE=-Iinclude -I../include -I/usr/local/include 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) @@ -175,9 +180,14 @@ ASTLINK=-Wl,-dynamic SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace else +ifeq (${OSARCH},OpenBSD) +ASTLINK=-Wl +SOLINK=-shared -Xlinker -x +else ASTLINK=-Wl,-E SOLINK=-shared -Xlinker -x endif +endif CC=gcc INSTALL=install Index: asterisk.c =================================================================== RCS file: /usr/cvsroot/asterisk/asterisk.c,v retrieving revision 1.51.2.18 diff -u -r1.51.2.18 asterisk.c --- asterisk.c 13 May 2004 21:55:50 -0000 1.51.2.18 +++ asterisk.c 17 May 2004 20:14:15 -0000 @@ -1553,7 +1553,7 @@ } -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) /* duh? ERANGE value copied from web... */ #define ERANGE 34 Index: md5.c =================================================================== RCS file: /usr/cvsroot/asterisk/md5.c,v retrieving revision 1.2.2.2 diff -u -r1.2.2.2 md5.c --- md5.c 26 Mar 2004 08:38:03 -0000 1.2.2.2 +++ md5.c 17 May 2004 20:14:15 -0000 @@ -1,7 +1,10 @@ /* MD5 checksum routines used for authentication. Not covered by GPL, but in the public domain as per the copyright below */ -#if defined( __FreeBSD__ ) || defined( __OpenBSD__ ) +#if defined( __FreeBSD__ ) # include +#elif defined(__OpenBSD__) +# include +# include #elif defined( BSD ) && ( BSD >= 199103 ) # include #else