[Asterisk-cvs] asterisk/channels Makefile,1.43,1.44 chan_h323.c,1.43,1.44

citats at lists.digium.com citats at lists.digium.com
Mon Apr 19 04:07:56 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/home/citats/cvs/asterisk/channels

Modified Files:
	Makefile chan_h323.c 
Log Message:
OpenBSD portability enhancements (bug 1002)


Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/Makefile,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- Makefile	16 Apr 2004 18:57:07 -0000	1.43
+++ Makefile	19 Apr 2004 08:11:51 -0000	1.44
@@ -33,6 +33,19 @@
 #
 #CHANNEL_LIBS+=chan_vofr
 
+ifeq (${OSARCH},OpenBSD)
+MYSQLLIB=-L/usr/local/lib/mysql -lmysqlclient
+CFLAGS+=-I/usr/local/include
+PTLIB=-lpt_OpenBSD_x86_r
+H323LIB=-lh323_OpenBSD_x86_r
+CHANH323LIB=-L/usr/local/lib
+else
+MYSQLLIB=-L/usr/lib/mysql -lmysqlclient
+PTLIB=-lpt_linux_x86_r
+H323LIB=-lh323_linux_x86_r
+CHANH323LIB=-ldl
+endif
+
 ifneq (${OSARCH},Darwin)
 CHANNEL_LIBS+=chan_oss.so
 endif
@@ -117,14 +130,14 @@
 
 chan_iax2.so: chan_iax2.o iax2-parser.o
 ifeq ($(USE_MYSQL_FRIENDS),1)
-	$(CC) $(SOLINK) -o $@ chan_iax2.o iax2-parser.o -L/usr/lib/mysql -lmysqlclient -lz
+	$(CC) $(SOLINK) -o $@ chan_iax2.o iax2-parser.o $(MYSQLLIB) -lz
 else
 	$(CC) $(SOLINK) -o $@ chan_iax2.o iax2-parser.o
 endif
 
 chan_iax.so: chan_iax.o
 ifeq ($(USE_MYSQL_FRIENDS),1)
-	$(CC) $(SOLINK) -o $@ chan_iax.o -L/usr/lib/mysql -lmysqlclient -lz
+	$(CC) $(SOLINK) -o $@ chan_iax.o $(MYSQLLIB) -lz
 else
 	$(CC) $(SOLINK) -o $@ chan_iax.o
 endif
@@ -137,7 +150,7 @@
 
 chan_sip.so: chan_sip.o
 ifeq ($(USE_MYSQL_FRIENDS),1)
-	$(CC) $(SOLINK) -o $@ chan_sip.o -L/usr/lib/mysql -lmysqlclient -lz
+	$(CC) $(SOLINK) -o $@ chan_sip.o $(MYSQLLIB) -lz
 else
 	$(CC) $(SOLINK) -o $@ chan_sip.o
 endif
@@ -158,7 +171,7 @@
 	 $(CXX) $(SOLINK) -o $@ $< -lvpb -lpthread -lm -ldl
 
 chan_h323.so: chan_h323.o h323/libchanh323.a
-	$(CC) $(SOLINK) -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) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lpthread -lcrypto -lssl -lexpat
 
 
 #chan_modem.so : chan_modem.o

Index: chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_h323.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- chan_h323.c	8 Apr 2004 19:28:05 -0000	1.43
+++ chan_h323.c	19 Apr 2004 08:11:51 -0000	1.44
@@ -55,7 +55,12 @@
 #include <netdb.h>
 #include <sys/signal.h>
 #include <netinet/ip.h>
-
+#ifdef __OpenBSD__
+#include <netinet/in_systm.h>
+#ifndef IPTOS_MINCOST
+#define IPTOS_MINCOST 0x02
+#endif
+#endif
 
 #include "h323/chan_h323.h"
 




More information about the svn-commits mailing list