2007年10月11日 星期四

Zaptel 編譯問題解決方式

Zaptel 編譯問題解決方式
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.
The error seems to be a syntax error and I don't now what to do with it, Can someone please give me some idea of what's wrong?

/lib/modules/2.6.9-34.0.1.EL/build
make -C /lib/modules/2.6.9-34.0.1.EL/build SUBDIRS=/usr/src/zaptel-1.2.6 modules
make[1]: Entering directory `/usr/src/kernels/2.6.9-34.0.1.EL-i686'
CC [M] /usr/src/zaptel-1.2.6/zaptel.o
/usr/src/zaptel-1.2.6/zaptel.c:384: error: syntax error before "zone_lock"
/usr/src/zaptel-1.2.6/zaptel.c:384: warning: type defaults to `int' in declaration of `zone_lock'
/usr/src/zaptel-1.2.6/zaptel.c:384: error: incompatible types in initialization
/usr/src/zaptel-1.2.6/zaptel.c:384: error: initializer element is not constant
/usr/src/zaptel-1.2.6/zaptel.c:384: warning: data definition has no type or storage class
/usr/src/zaptel-1.2.6/zaptel.c:385: error: syntax error before "chan_lock"
/usr/src/zaptel-1.2.6/zaptel.c:385: warning: type defaults to `int' in declaration of `chan_lock'
/usr/src/zaptel-1.2.6/zaptel.c:385: error: incompatible types in initialization
/usr/src/zaptel-1.2.6/zaptel.c:385: error: initializer element is not constant
/usr/src/zaptel-1.2.6/zaptel.c:385: warning: data definition has no type or storage class
/usr/src/zaptel-1.2.6/zaptel.c:188: warning: 'fcstab' defined but not used
make[2]: *** [/usr/src/zaptel-1.2.6/zaptel.o] Error 1
make[1]: *** [_module_/usr/src/zaptel-1.2.6] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.9-34.0.1.EL-i686'
make: *** [linux26] Error 2

did yo fix spinlock.h?
Quote:

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

Save the changes to all copies of this file you have, after these changes have been made your zaptel drivers should compile just fine.

沒有留言: