[dahdi-commits] tzafrir: linux/trunk r9117 - /linux/trunk/include/dahdi/kernel.h

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Mon Aug 9 09:43:07 CDT 2010


Author: tzafrir
Date: Mon Aug  9 09:43:04 2010
New Revision: 9117

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9117
Log:
work around RHEL backport of strcasecmp

RHEL/Centos 5.4 kernels broke after the latest strcasecmp backport. So skip
them.

Modified:
    linux/trunk/include/dahdi/kernel.h

Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=9117&r1=9116&r2=9117
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Mon Aug  9 09:43:04 2010
@@ -1204,6 +1204,15 @@
 
 #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 @@
 	} 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)
 {




More information about the dahdi-commits mailing list