Package: asterisk
Version: 1.0.9.dfsg-3
Severity: serious
Tags: patch

asterisk fails to build because it declares uniquelock as extern in
channel.h and defines is as static in channel.c:

gcc -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes 
-Wmissing-declarations -g  -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE  
-O2 -march=i386   -DZAPTEL_OPTIMIZATIONS  -DASTERISK_VERSION=\"\" 
-DINSTALL_PREFIX=\"\" -DASTETCDIR=\"/etc/asterisk\" 
-DASTLIBDIR=\"/usr/lib/asterisk\" -DASTVARLIBDIR=\"/var/lib/asterisk\" 
-DASTVARRUNDIR=\"/var/run/asterisk\" -DASTSPOOLDIR=\"/var/spool/asterisk\" 
-DASTDATADIR=\"/usr/share/asterisk\" -DASTLOGDIR=\"/var/log/asterisk\" 
-DASTCONFPATH=\"/etc/asterisk/asterisk.conf\" 
-DASTMODDIR=\"/usr/lib/asterisk/modules\" 
-DASTAGIDIR=\"/usr/share/asterisk/agi-bin\"     -DBUSYDETECT_MARTIN        -c 
-o channel.o channel.c
channel.c:64: error: static declaration of 'uniquelock' follows non-static 
declaration
include/asterisk/channel.h:58: error: previous declaration of 'uniquelock' was 
here
make[1]: *** [channel.o] Error 1
make[1]: Leaving directory `/tmp/buildd/asterisk-1.0.9.dfsg'
make: *** [build-arch-stamp] Error 2

The attached patch makes the definition in channel.c not use static.

-- 
Matt
diff -ru asterisk-1.0.9.dfsg/debian/patches/bristuff-0.2.0-RC8h.dpatch 
asterisk-1.0.9.dfsg.new/debian/patches/bristuff-0.2.0-RC8h.dpatch
--- asterisk-1.0.9.dfsg/debian/patches/bristuff-0.2.0-RC8h.dpatch       
2005-07-20 09:21:01.000000000 -0700
+++ asterisk-1.0.9.dfsg.new/debian/patches/bristuff-0.2.0-RC8h.dpatch   
2005-07-20 09:13:13.000000000 -0700
@@ -976,7 +976,7 @@
 +extern int ast_mainpid; /* provided by asterisk.c */
  static int shutting_down = 0;
  static int uniqueint = 0;
-+AST_MUTEX_DEFINE_STATIC(uniquelock);
++AST_MUTEX_DEFINE_EXPORTED(uniquelock);
  
  /* XXX Lock appropriately in more functions XXX */
  
diff -ru asterisk-1.0.9.dfsg/debian/patches/bristuff-0.2.0-RC8j.dpatch 
asterisk-1.0.9.dfsg.new/debian/patches/bristuff-0.2.0-RC8j.dpatch
--- asterisk-1.0.9.dfsg/debian/patches/bristuff-0.2.0-RC8j.dpatch       
2005-07-20 09:21:01.000000000 -0700
+++ asterisk-1.0.9.dfsg.new/debian/patches/bristuff-0.2.0-RC8j.dpatch   
2005-07-20 09:13:24.000000000 -0700
@@ -977,7 +977,7 @@
 +extern int ast_mainpid; /* provided by asterisk.c */
  static int shutting_down = 0;
  static int uniqueint = 0;
-+AST_MUTEX_DEFINE_STATIC(uniquelock);
++AST_MUTEX_DEFINE_EXPORTED(uniquelock);
  
  /* XXX Lock appropriately in more functions XXX */
  

Attachment: signature.asc
Description: Digital signature

Reply via email to