From da0aa6f231d39f6d12c97f16b439c65cb8d29254 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Sat, 19 Jan 2013 17:02:41 -0600 Subject: [PATCH] xpp: Do not typedef bool on RHEL 5.2 or later. Without digging into the specifics, it looks like Red Hat Linux 5.9 removed the hex_asc definition that was previously used to determine if the bool definition was backported. We can simply use the RHEL_RELEASE_CODE now since we do not support any releases before the 5 series now. Reported-By: Vladimir Mikhelson Internal-Issue-ID: DAHLIN-312 Signed-off-by: Shaun Ruffell Acked-By: Tzafrir Cohen --- drivers/dahdi/xpp/xdefs.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/dahdi/xpp/xdefs.h b/drivers/dahdi/xpp/xdefs.h index 054c30c..b15fa05 100644 --- a/drivers/dahdi/xpp/xdefs.h +++ b/drivers/dahdi/xpp/xdefs.h @@ -145,10 +145,12 @@ typedef char *charp; #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) -/* Also don't define this for later RHEL >= 5.2 . hex_asc is from the - * same linux-2.6-net-infrastructure-updates-to-mac80211-iwl4965.patch - * as is the bool typedef. */ -#if LINUX_VERSION_CODE != KERNEL_VERSION(2, 6, 18) || !defined(hex_asc) +/* Also don't define this for later RHEL >= 5.2. */ +#if defined(RHEL_RELEASE_CODE) && defined(RHEL_RELEASE_VERSION) +#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(5, 3) +typedef int bool; +#endif +#else typedef int bool; #endif #endif