])
])
+# LIBCFS_DIGEST_SETKEY_FLAGS
+# digest_alg.dia_setkey takes 4 args (2.6.18)
+#
+AC_DEFUN([LIBCFS_DIGEST_SETKEY_FLAGS],
+[AC_MSG_CHECKING([if kernel dia_setkey takes 4 args])
+LB_LINUX_TRY_COMPILE([
+ #include <linux/err.h>
+ #include <linux/crypto.h>
+],[
+ struct digest_alg alg;
+
+ alg.dia_setkey(NULL, NULL, 0, NULL);
+],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_DIGEST_SETKEY_FLAGS, 1, [kernel dia_setkey takes 4 args])
+],[
+ AC_MSG_RESULT([no])
+])
+])
+
# 2.6.19 API changes
# kmem_cache_destroy(cachep) return void instead of
# int
])
])
+
# 2.6.20 API change INIT_WORK use 2 args and not
# store data inside
AC_DEFUN([LIBCFS_3ARGS_INIT_WORK],
])
])
+# LIBCFS_STRUCT_SHASH_ALG
+# struct shash_alg was introduced in 2.6.29
+#
+AC_DEFUN([LIBCFS_STRUCT_SHASH_ALG],
+[AC_MSG_CHECKING([if kernel has struct shash_alg])
+LB_LINUX_TRY_COMPILE([
+ #include <linux/err.h>
+ #include <crypto/internal/hash.h>
+],[
+ struct shash_alg foo;
+],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_STRUCT_SHASH_ALG, 1, [kernel has struct shash_alg])
+],[
+ AC_MSG_RESULT([no])
+])
+])
+
+
#
# LIBCFS_FUNC_UNSHARE_FS_STRUCT
#
# 2.6.18
LIBCFS_TASKLIST_LOCK
LIBCFS_HAVE_IS_COMPAT_TASK
+LIBCFS_DIGEST_SETKEY_FLAGS
# 2.6.19
LIBCFS_KMEM_CACHE_DESTROY_INT
# 2.6.20
# 2.6.29
LIBCFS_STRUCT_CRED_IN_TASK
LIBCFS_CPU_TOPOLOGY
+LIBCFS_STRUCT_SHASH_ALG
# 2.6.30
LIBCFS_FUNC_UNSHARE_FS_STRUCT
LIBCFS_SOCK_MAP_FD_2ARG
# lnet/utils/wirecheck.c
AC_CHECK_FUNCS([strnlen])
+# lnet/libcfs/user-prim.c, missing for RHEL5 and earlier userspace
+AC_CHECK_FUNCS([strlcpy])
+
+# libcfs/libcfs/user-prim.c, missing for RHEL5 and earlier userspace
+AC_CHECK_FUNCS([strlcat])
+
AC_CHECK_TYPE([umode_t],
[AC_DEFINE(HAVE_UMODE_T, 1, [umode_t is defined])],
[],