Summary: | ASTERISK-06519: Upgrade to 2.6.9-34.ELsmp and zaptel can not compile | ||
Reporter: | Alan Painter (apainter) | Labels: | |
Date Opened: | 2006-03-10 19:06:39.000-0600 | Date Closed: | 2011-06-07 14:03:23 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | /lib/modules/2.6.9-34.ELsmp/build make -C /lib/modules/2.6.9-34.ELsmp/build SUBDIRS=/usr/src/zaptel-1.2.4 XPPMOD= modules make[1]: Entering directory `/usr/src/kernels/2.6.9-34.EL-smp-i686' CC [M] /usr/src/zaptel-1.2.4/zaptel.o /usr/src/zaptel-1.2.4/zaptel.c:384: error: syntax error before "zone_lock" /usr/src/zaptel-1.2.4/zaptel.c:384: warning: type defaults to `int' in declaration of `zone_lock' /usr/src/zaptel-1.2.4/zaptel.c:384: error: incompatible types in initialization /usr/src/zaptel-1.2.4/zaptel.c:384: error: initializer element is not constant /usr/src/zaptel-1.2.4/zaptel.c:384: warning: data definition has no type or storage class /usr/src/zaptel-1.2.4/zaptel.c:385: error: syntax error before "chan_lock" /usr/src/zaptel-1.2.4/zaptel.c:385: warning: type defaults to `int' in declaration of `chan_lock' /usr/src/zaptel-1.2.4/zaptel.c:385: error: incompatible types in initialization /usr/src/zaptel-1.2.4/zaptel.c:385: error: initializer element is not constant /usr/src/zaptel-1.2.4/zaptel.c:385: warning: data definition has no type or storage class /usr/src/zaptel-1.2.4/zaptel.c: In function `free_tone_zone': /usr/src/zaptel-1.2.4/zaptel.c:1034: warning: passing arg 1 of `_write_lock' from incompatible pointer type /usr/src/zaptel-1.2.4/zaptel.c:1037: warning: passing arg 1 of `_write_unlock' from incompatible pointer type /usr/src/zaptel-1.2.4/zaptel.c: In function `zt_register_tone_zone': /usr/src/zaptel-1.2.4/zaptel.c:1047: warning: passing arg 1 of `_write_lock' from incompatible pointer type /usr/src/zaptel-1.2.4/zaptel.c:1054: warning: passing arg 1 of `_write_unlock' from incompatible pointer type /usr/src/zaptel-1.2.4/zaptel.c: In function `set_tone_zone': /usr/src/zaptel-1.2.4/zaptel.c:1095: warning: passing arg 1 of `_read_lock' from incompatible pointer type /usr/src/zaptel-1.2.4/zaptel.c:1107: warning: passing arg 1 of `_read_unlock' from incompatible pointer type /usr/src/zaptel-1.2.4/zaptel.c: In function `zt_chan_reg': /usr/src/zaptel-1.2.4/zaptel.c:1188: warning: passing arg 1 of `_write_lock_irqsave' from incompatible pointer type /usr/src/zaptel-1.2.4/zaptel.c:1211: warning: passing arg 1 of `_write_unlock_irqrestore' from incompatible pointer type /usr/src/zaptel-1.2.4/zaptel.c: In function `zt_chan_unreg': /usr/src/zaptel-1.2.4/zaptel.c:1584: warning: passing arg 1 of `_write_lock_irqsave' from incompatible pointer type /usr/src/zaptel-1.2.4/zaptel.c:1620: warning: passing arg 1 of `_write_unlock_irqrestore' from incompatible pointer type /usr/src/zaptel-1.2.4/zaptel.c: In function `zt_ctl_ioctl': /usr/src/zaptel-1.2.4/zaptel.c:3343: warning: passing arg 1 of `_write_lock' from incompatible pointer type /usr/src/zaptel-1.2.4/zaptel.c:3345: warning: passing arg 1 of `_write_unlock' from incompatible pointer type /usr/src/zaptel-1.2.4/zaptel.c: In function `zt_init': /usr/src/zaptel-1.2.4/zaptel.c:6553: error: incompatible types in assignment /usr/src/zaptel-1.2.4/zaptel.c: At top level: /usr/src/zaptel-1.2.4/zaptel.c:188: warning: 'fcstab' defined but not used make[2]: *** [/usr/src/zaptel-1.2.4/zaptel.o] Error 1 make[1]: *** [_module_/usr/src/zaptel-1.2.4] Error 2 make[1]: Leaving directory `/usr/src/kernels/2.6.9-34.EL-smp-i686' make: *** [linux26] Error 2 | ||
Comments: | By: Michael J. Maravillo (maravillo) 2006-03-12 01:25:57.000-0600 Also bumped on this when trying to recompile zaptel on a new CentOS install. Below is a quick and dirty fix I had to come up for the meantime just to get zaptel to compile... Index: zaptel.c =================================================================== --- zaptel.c (revision 977) +++ zaptel.c (working copy) @@ -416,13 +416,13 @@ static u_char defgain[256]; -#ifdef DEFINE_RWLOCK -static DEFINE_RWLOCK(zone_lock); -static DEFINE_RWLOCK(chan_lock); -#else +//#ifdef DEFINE_RWLOCK +//static DEFINE_RWLOCK(zone_lock); +//static DEFINE_RWLOCK(chan_lock); +//#else static rwlock_t zone_lock = RW_LOCK_UNLOCKED; static rwlock_t chan_lock = RW_LOCK_UNLOCKED; -#endif +//#endif static struct zt_zone *tone_zones[ZT_TONE_ZONE_MAX]; Index: torisa.c =================================================================== --- torisa.c (revision 977) +++ torisa.c (working copy) @@ -130,11 +130,11 @@ static int spansstarted = 0; -#ifdef DEFINE_RWLOCK -static DEFINE_RWLOCK(torisa); -#else +//#ifdef DEFINE_RWLOCK +//static DEFINE_RWLOCK(torisa); +//#else static rwlock_t torisa = RW_LOCK_UNLOCKED; -#endif +//#endif static u_char readdata[2][64][ZT_MAX_CHUNKSIZE]; static u_char writedata[2][64][ZT_MAX_CHUNKSIZE]; By: Michael J. Maravillo (maravillo) 2006-03-12 01:28:58.000-0600 Just for reference, here's the code on 2.6.9-34.EL that might have caused the compile errors... diff -urN 2.6.9-22.EL-i686/include/linux/spinlock.h 2.6.9-34.EL-i686/include/linux/spinlock.h --- 2.6.9-22.EL-i686/include/linux/spinlock.h 2005-10-09 06:29:39.000000000 +0800 +++ 2.6.9-34.EL-i686/include/linux/spinlock.h 2006-03-08 14:03:30.000000000 +0800 @@ -403,6 +403,8 @@ #define spin_trylock(lock) _spin_trylock(lock) #define write_trylock(lock) _write_trylock(lock) +#define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED +#define DEFINE_RWLOCK(x) rw_lock_t x = RW_LOCK_UNLOCKED /* Where's read_trylock? */ #define spin_lock(lock) _spin_lock(lock) By: Michael J. Maravillo (maravillo) 2006-03-12 01:45:36.000-0600 Had to investigate further... obviously it's a typo on the new spinlock.h. rw_lock_t isn't defined elsewhere, but rwlock_t is. By: Tilghman Lesher (tilghman) 2006-03-13 08:00:08.000-0600 maravilo's note makes it very clear that this is a Red Hat issue that needs to be fixed by Red Hat. Please report this issue back to Red Hat. |