Add missing definition of strncasecmp() for older kernels.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@358 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Stanislaw Gruszka
2008-04-24 13:12:08 +00:00
parent 0f3f7be821
commit 37c1a3ab1a

View File

@@ -1234,6 +1234,24 @@ isp_task_mgmt_fn_done(struct scst_mgmt_cmd *mgmt_cmd)
static DEFINE_MUTEX(proc_mutex);
/*
* Many procfs things is taken from scst/src/scst_proc.c
*/
#if !defined(CONFIG_PPC) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))
static int strncasecmp(const char *s1, const char *s2, size_t n)
{
int c1, c2;
do {
c1 = tolower(*s1++);
c2 = tolower(*s2++);
} while ((--n > 0) && c1 == c2 && c1 != 0);
return c1 - c2;
}
#endif
static int
isp_read_proc(struct seq_file *seq, void *v)
{