[Asterisk-Dev] Little patch so chan_capi 0.3.4 will compile with latest CVS HEAD
steve at daviesfam.org
steve at daviesfam.org
Tue Jun 22 08:31:18 MST 2004
Attached a little patch needed to build chan_capi 0.3.4 against CVS HEAD.
Regards,
Steve
-------------- next part --------------
diff -U3 -r orig/chan_capi-0.3.4/Makefile chan_capi-0.3.4/Makefile
--- orig/chan_capi-0.3.4/Makefile 2004-06-08 12:27:44.000000000 +0200
+++ chan_capi-0.3.4/Makefile 2004-06-22 15:01:32.000000000 +0200
@@ -54,7 +54,7 @@
CFLAGS+=-DCAPI_SYNC
# if you want to compile against latest (non-stable) asterisk cvs
-#CFLAGS+=-DUNSTABLE_CVS
+CFLAGS+=-DUNSTABLE_CVS
LIBS=-ldl -lpthread -lm
CC=gcc
diff -U3 -r orig/chan_capi-0.3.4/chan_capi.c chan_capi-0.3.4/chan_capi.c
--- orig/chan_capi-0.3.4/chan_capi.c 2004-06-07 14:40:17.000000000 +0200
+++ chan_capi-0.3.4/chan_capi.c 2004-06-22 15:00:55.000000000 +0200
@@ -57,11 +57,19 @@
static int usecnt;
+#ifdef AST_MUTEX_DEFINE_STATIC
+AST_MUTEX_DEFINE_STATIC(usecnt_lock);
+AST_MUTEX_DEFINE_STATIC(iflock);
+AST_MUTEX_DEFINE_STATIC(pipelock);
+AST_MUTEX_DEFINE_STATIC(monlock);
+AST_MUTEX_DEFINE_STATIC(contrlock);
+#else
static ast_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER;
static ast_mutex_t iflock = AST_MUTEX_INITIALIZER;
static ast_mutex_t pipelock = AST_MUTEX_INITIALIZER;
static ast_mutex_t monlock = AST_MUTEX_INITIALIZER;
static ast_mutex_t contrlock = AST_MUTEX_INITIALIZER;
+#endif
#ifdef CAPI_ULAW
static int capi_capability = AST_FORMAT_ULAW;
@@ -82,8 +90,13 @@
static char capi_send_buffer[AST_CAPI_MAX_B3_BLOCKS * AST_CAPI_MAX_B3_BLOCK_SIZE];
static int capi_send_buffer_handle = 0;
+#ifdef AST_MUTEX_DEFINE_STATIC
+AST_MUTEX_DEFINE_STATIC(capi_send_buffer_lock);
+AST_MUTEX_DEFINE_STATIC(capi_put_lock);
+#else
static ast_mutex_t capi_send_buffer_lock = AST_MUTEX_INITIALIZER;
static ast_mutex_t capi_put_lock = AST_MUTEX_INITIALIZER;
+#endif
char capi_national_prefix[AST_MAX_EXTENSION];
char capi_international_prefix[AST_MAX_EXTENSION];
More information about the asterisk-dev
mailing list