+# 2.6.21 uses struct kmem_cache instead of kmem_cache_s for
+# kmem_cache_t
+AC_DEFUN([LN_KMEM_CACHE_S],
+[AC_MSG_CHECKING([check kernel has struct kmem_cache_s])
+tmp_flags="$EXTRA_KCFLAGS"
+EXTRA_KCFLAGS="-Werror"
+LB_LINUX_TRY_COMPILE([
+ #include <linux/slab.h>
+],[
+ struct kmem_cache_s *cachep = NULL;
+
+ kmem_cache_free(cachep, NULL);
+
+],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_KMEM_CACHE_n, 1,
+ [kernel has struct kmem_cache_s])
+],[
+ AC_MSG_RESULT(NO)
+])
+EXTRA_KCFLAGS="$tmp_flags"
+])
+