Skip to content

Commit

Permalink
crypto: sha - Fix build error due to crypto_sha1_update
Browse files Browse the repository at this point in the history
On Tue, Aug 16, 2011 at 03:22:34PM +1000, Stephen Rothwell wrote:
>
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) produced this warning:
>
> In file included from security/integrity/ima/../integrity.h:16:0,
>                  from security/integrity/ima/ima.h:27,
>                  from security/integrity/ima/ima_policy.c:20:
> include/crypto/sha.h:86:10: warning: 'struct shash_desc' declared inside parameter list
> include/crypto/sha.h:86:10: warning: its scope is only this definition or declaration, which is probably not what you want
>
> Introduced by commit 7c39017 ("crypto: sha1 - export sha1_update for
> reuse").  I guess you need to include crypto/hash.h in crypto/sha.h.

This patch fixes this by providing a declaration for struct shash_desc.

Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Aug 16, 2011
1 parent e27303b commit 4619b6b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/crypto/sha.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ struct sha512_state {
u8 buf[SHA512_BLOCK_SIZE];
};

struct shash_desc;

extern int crypto_sha1_update(struct shash_desc *desc, const u8 *data,
unsigned int len);

Expand Down

0 comments on commit 4619b6b

Please sign in to comment.