[asterisk-bugs] [Zaptel 0012889]: [patch] RHEL/Centos 5.2: xpp/xdefs.h:117: error: conflicting types for ‘bool’

noreply at bugs.digium.com noreply at bugs.digium.com
Fri Jun 27 12:05:36 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12889 
====================================================================== 
Reported By:                tzafrir
Assigned To:                tzafrir
====================================================================== 
Project:                    Zaptel
Issue ID:                   12889
Category:                   Astribank (xpp)
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Zaptel Version:              SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 4353 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             06-19-2008 07:27 CDT
Last Modified:              06-27-2008 12:05 CDT
====================================================================== 
Summary:                    [patch] RHEL/Centos 5.2: xpp/xdefs.h:117: error:
conflicting types for ‘bool’
Description: 
The kernel included in RHEL 5.2 and thus also in Centos 5.2 backported a
feature from kernel 2.6.19: the type "bool".

The xpp driver used a "bool" type of its own even before definition. Hence
it only adds that typedef for kernel versions that should not have it
already:

kernel/xpp/xdefs.h:

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
typedef int                     bool;
#endif

Thus we get the following error:

  CC [M]  /usr/src/zaptel-1.4.11/kernel/xpp/card_fxo.o
In file included from /usr/src/zaptel-1.4.11/kernel/xpp/xpd.h:26,
                 from /usr/src/zaptel-1.4.11/kernel/xpp/card_fxo.c:27:
/usr/src/zaptel-1.4.11/kernel/xpp/xdefs.h:117: error: conflicting types
for ‘bool’
include/linux/types.h:36: error: previous declaration of ‘bool’ was
here
make[4]: *** [/usr/src/zaptel-1.4.11/kernel/xpp/card_fxo.o] Error 1
make[3]: *** [/usr/src/zaptel-1.4.11/kernel/xpp] Error 2
make[2]: *** [_module_/usr/src/zaptel-1.4.11/kernel] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.18-92.1.1.el5-x86_64'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/zaptel-1.4.11'
make: *** [all] Error 2


Simple workaround for that specific case: avoid that typedef:
                                } while(0);

 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
-typedef int                    bool;
+//typedef int                  bool;
 #endif
 #else
 typedef int                    bool;

====================================================================== 

---------------------------------------------------------------------- 
 Weezey - 06-27-08 12:05  
---------------------------------------------------------------------- 
That patch solved the compile problem for me.  Thanks. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-27-08 12:05  Weezey         Note Added: 0089366                          
======================================================================




More information about the asterisk-bugs mailing list