[asterisk-users] Re: CentOS 4.3 and Zaptel-1.2.7

Tony Mountifield tony at softins.clara.co.uk
Wed Jul 19 03:31:05 MST 2006


In article <44BD6A10.2030003 at fubegra.net>, Russ Price <kxt at fubegra.net> 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: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list