[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
Sat Jun 28 02:17:32 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-28-2008 02:17 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;
======================================================================
----------------------------------------------------------------------
svnbot - 06-28-08 02:17
----------------------------------------------------------------------
Repository: zaptel
Revision: 4367
U branches/1.2/xpp/xdefs.h
------------------------------------------------------------------------
r4367 | tzafrir | 2008-06-28 02:17:26 -0500 (Sat, 28 Jun 2008) | 2 lines
Fixes building with the kernel of RHEL 5.2. Closes issue
http://bugs.digium.com/view.php?id=12889 .
------------------------------------------------------------------------
http://svn.digium.com/view/zaptel?view=rev&revision=4367
Issue History
Date Modified Username Field Change
======================================================================
06-28-08 02:17 svnbot Note Added: 0089395
======================================================================
More information about the asterisk-bugs
mailing list