From 2a2f2b6485c32e94627601e66311420e367314ca Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Mon, 9 Aug 2010 14:43:04 +0000 Subject: work around RHEL backport of strcasecmp RHEL/Centos 5.4 kernels broke after the latest strcasecmp backport. So skip them. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9117 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- include/dahdi/kernel.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/dahdi') diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 721ad57..89f0a39 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -1204,6 +1204,15 @@ static inline short dahdi_txtone_nextsample(struct dahdi_chan *ss) #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) #include +/* A define of 'clamp_val' happened to be added in the patch + * linux-2.6-sata-prep-work-for-rhel5-3.patch kernel-2.6.spec that also + * backported support for strcasecmp to some later RHEL/Centos kernels. + * If you have an older kernel that breaks because strcasecmp is already + * defined, somebody out-smarted us. In that case, replace the line below + * with '#if 0' to get the code building, and file a bug report at + * https://issues.asterisk.org/ . + */ +#ifndef clamp_val static inline int strcasecmp(const char *s1, const char *s2) { int c1, c2; @@ -1214,6 +1223,7 @@ static inline int strcasecmp(const char *s1, const char *s2) } while (c1 == c2 && c1 != 0); return c1 - c2; } +#endif /* clamp_val */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18) static inline void list_replace(struct list_head *old, struct list_head *new) { -- cgit v1.2.3