aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ahash.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2011-11-03 08:46:07 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2011-11-10 17:57:06 -0500
commit3acc84739dd5d746840f881ad4d60bd2a428f1dd (patch)
treea93db24c1b59dc077dcd1b69407e5bc7e71d11b0 /crypto/ahash.c
parentfb223c32b4d3ee593c8dce07e983680d06abe387 (diff)
crypto: algapi - Fix build problem with NET disabled
The report functions use NLA_PUT so we need to ensure that NET is enabled. Reported-by: Luis Henriques <henrix@camandro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ahash.c')
-rw-r--r--crypto/ahash.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c
index a3e6ef99394a..ac93c99cfae8 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -399,6 +399,7 @@ static unsigned int crypto_ahash_extsize(struct crypto_alg *alg)
399 return sizeof(struct crypto_shash *); 399 return sizeof(struct crypto_shash *);
400} 400}
401 401
402#ifdef CONFIG_NET
402static int crypto_ahash_report(struct sk_buff *skb, struct crypto_alg *alg) 403static int crypto_ahash_report(struct sk_buff *skb, struct crypto_alg *alg)
403{ 404{
404 struct crypto_report_hash rhash; 405 struct crypto_report_hash rhash;
@@ -416,6 +417,12 @@ static int crypto_ahash_report(struct sk_buff *skb, struct crypto_alg *alg)
416nla_put_failure: 417nla_put_failure:
417 return -EMSGSIZE; 418 return -EMSGSIZE;
418} 419}
420#else
421static int crypto_ahash_report(struct sk_buff *skb, struct crypto_alg *alg)
422{
423 return -ENOSYS;
424}
425#endif
419 426
420static void crypto_ahash_show(struct seq_file *m, struct crypto_alg *alg) 427static void crypto_ahash_show(struct seq_file *m, struct crypto_alg *alg)
421 __attribute__ ((unused)); 428 __attribute__ ((unused));