In article <[EMAIL PROTECTED]>, Russ Price <[EMAIL PROTECTED]> wrote: > varun wrote: > > I have problems compiling zaptel 1.2.6 on my CentOS 4.3. CentOS is > > updated and I believe I have installed all the dependencies. > > > > did you fix spinlock.h? > > > > Go into your kernel source directory(or directories if you have more > > than one kernel source on your system) and edit the file spinlock.h > > Then goto line 407 > > > > Change this line from : > > > > #define DEFINE_RWLOCK(x) rw_lock_t x = RW__LOCK_UNLOCKED > > To: > > #define DEFINE_RWLOCK(x) rwlock_t x = RW__LOCK_UNLOCKED > > > The problem is that this will have to be done with each new kernel > release.
If it is an error in the kernel, why does it not just get fixed in any new release of the kernel? > What I've done instead is to modify the zaptel Makefile, > inserting this single line at line 40: > > CFLAGS+=$(shell if uname -r | grep -q '2\.6\.9-34.*\.EL'; then echo " > -Drw_lock_t=rwlock_t"; fi) > > This will fix the problem for any 2.6.9-34 CentOS (or RHEL) kernel. This is a good idea, and worthy of inclusion in the Asterisk tree, IMHO, to stem the steady stream of queries about this problem. However, unless there is a legitimate occurrence of rw_lock_t in other kernel versions, this doesn't really need to be made version-dependent, does it? Could just do this and it would be compatible with any version: CFLAGS+= -Drw_lock_t=rwlock_t Cheers Tony -- Tony Mountifield Work: [EMAIL PROTECTED] - http://www.softins.co.uk Play: [EMAIL PROTECTED] - http://tony.mountifield.org _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users