]) # LIBCFS_FPU_API
#
+# Kernel version 4.5-rc1 commit d12481bc58fba89427565f8592e88446ec084a24
+# added crypto hash helpers
+#
+AC_DEFUN([LIBCFS_CRYPTO_HASH_HELPERS], [
+LB_CHECK_COMPILE([does crypto hash helper functions exist],
+crypto_hash_helpers, [
+ #include <crypto/hash.h>
+],[
+ crypto_ahash_alg_name(NULL);
+ crypto_ahash_driver_name(NULL);
+],[
+ AC_DEFINE(HAVE_CRYPTO_HASH_HELPERS, 1,
+ [crypto hash helper functions are available])
+])
+]) # LIBCFS_CRYPTO_HASH_HELPERS
+
+#
# LIBCFS_PROG_LINUX
#
# LibCFS linux kernel checks
# 4.2
LIBCFS_HAVE_TOPOLOGY_SIBLING_CPUMASK
LIBCFS_FPU_API
+# 4.5
+LIBCFS_CRYPTO_HASH_HELPERS
]) # LIBCFS_PROG_LINUX
#
#include <libcfs/libcfs_crypto.h>
#include <libcfs/linux/linux-crypto.h>
-#ifndef crypto_ahash_alg_name
+#ifndef HAVE_CRYPTO_HASH_HELPERS
static inline const char *crypto_ahash_alg_name(struct crypto_ahash *tfm)
{
return crypto_tfm_alg_name(crypto_ahash_tfm(tfm));
}
-#endif
-#ifndef crypto_ahash_driver_name
static inline const char *crypto_ahash_driver_name(struct crypto_ahash *tfm)
{
return crypto_tfm_alg_driver_name(crypto_ahash_tfm(tfm));