diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2010-08-09 14:43:04 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2010-08-09 14:43:04 +0000 |
commit | a5415efa64c0fbb0e50a1ea06d24ba7e36eccdda (patch) | |
tree | 7aebddc82e650a15bc2c15d2f0db3db5a4e7bf2a /include | |
parent | a6c5baf2a4c4cfe34cb51ec9ab5f91434016b6e8 (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/dahdi/kernel.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 <linux/ctype.h> +/* 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) { |