# Problems Compiling Zaptel driver

**URL:** <https://community.asterisk.org/t/problems-compiling-zaptel-driver/6476>\
**Category:** Asterisk Support\
**Created:** [May 18, 2006, 1:32pm UTC](https://community.asterisk.org/t/problems-compiling-zaptel-driver/6476 "2006-05-18T13:32:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neuronal](https://avatars.discourse-cdn.com/v4/letter/n/aeb1de/32.png) [@Neuronal](https://community.asterisk.org/u/Neuronal)\
**Post date:** [May 18, 2006, 1:32pm UTC](https://community.asterisk.org/t/problems-compiling-zaptel-driver/6476/1 "2006-05-18T13:32:19Z")

</div>

Hi

here are my problems:

1. not really a clue about linux.
2. Zaptel driver runs in errors during compiling.

System:  
Cent OS 4  
linux kernel 2.6.3.-EL

i tryed to compile the zaptel driver and got the following error(s)

`  
CC [M] /root/Asterisk/zaptel-1.2.5/zaptel.o
/root/Asterisk/zaptel-1.2.5/zaptel.c:384: error: syntax error before "zone_lock"
/root/Asterisk/zaptel-1.2.5/zaptel.c:384: warning: type defaults to `int' in dec laration of `zone_lock'
/root/Asterisk/zaptel-1.2.5/zaptel.c:384: error: incompatible types in initializ ation
/root/Asterisk/zaptel-1.2.5/zaptel.c:384: error: initializer element is not cons tant
/root/Asterisk/zaptel-1.2.5/zaptel.c:384: warning: data definition has no type o r storage class
/root/Asterisk/zaptel-1.2.5/zaptel.c:385: error: syntax error before "chan_lock"
/root/Asterisk/zaptel-1.2.5/zaptel.c:385: warning: type defaults to `int' in dec laration of `chan_lock'
/root/Asterisk/zaptel-1.2.5/zaptel.c:385: error: incompatible types in initializ ation
/root/Asterisk/zaptel-1.2.5/zaptel.c:385: error: initializer element is not cons tant
/root/Asterisk/zaptel-1.2.5/zaptel.c:385: warning: data definition has no type o r storage class
/root/Asterisk/zaptel-1.2.5/zaptel.c:188: warning: 'fcstab' defined but not used
make[2]: *** [/root/Asterisk/zaptel-1.2.5/zaptel.o] Error 1
make[1]: *** [_module_/root/Asterisk/zaptel-1.2.5] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.9-34.EL-i686'
make: *** [linux26] Error 2
` 😮

Can somebody tell me what i have to do and in a way for a noob because i couldn’t figure out what the FAQ wanted from me. ❓

many Thanks

---

<div class="post-metadata">

**Author:** ![xlitang](https://avatars.discourse-cdn.com/v4/letter/x/439d5e/32.png) [@xlitang](https://community.asterisk.org/u/xlitang)\
**Post date:** [May 18, 2006, 2:21pm UTC](https://community.asterisk.org/t/problems-compiling-zaptel-driver/6476/2 "2006-05-18T14:21:15Z")

</div>

try following, it shpuld fix your problem.

cd /usr/src/kernels/2.6.9-34.EL-i686/include/linux  
mv spinlock.h spinlock.h.old  
wget [nerdvittles.com/aah27/spinlock.h](http://nerdvittles.com/aah27/spinlock.h)  
shutdown -r now

* * *

无尽的思念，无限的情怀，[http://Call2China.com](http://Call2China.com) 千言万语，任你倾诉。。。

---

<div class="post-metadata">

**Author:** ![Neuronal](https://avatars.discourse-cdn.com/v4/letter/n/aeb1de/32.png) [@Neuronal](https://community.asterisk.org/u/Neuronal)\
**Post date:** [May 18, 2006, 2:52pm UTC](https://community.asterisk.org/t/problems-compiling-zaptel-driver/6476/3 "2006-05-18T14:52:29Z")

</div>

thanks ill try it out

---

<div class="post-metadata">

**Author:** ![mpounsett](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@mpounsett](https://community.asterisk.org/u/mpounsett)\
**Post date:** [June 1, 2006, 7:19pm UTC](https://community.asterisk.org/t/problems-compiling-zaptel-driver/6476/4 "2006-06-01T19:19:10Z")

</div>

The same problem appears to affect RedHat Enterprise 4.x, and this fix solved the issue there as well.

---

<div class="post-metadata">

**Author:** ![eddylai](https://avatars.discourse-cdn.com/v4/letter/e/f07891/32.png) [@eddylai](https://community.asterisk.org/u/eddylai)\
**Post date:** [June 5, 2006, 1:56am UTC](https://community.asterisk.org/t/problems-compiling-zaptel-driver/6476/5 "2006-06-05T01:56:23Z")

</div>

I had the same problem after online updated the kernel. Thanks for your help. 😃
