diff --git a/crypto/cryptosoft.c b/crypto/cryptosoft.c index 6c149cf1b1d..255b0b405ab 100644 --- a/crypto/cryptosoft.c +++ b/crypto/cryptosoft.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -42,10 +43,6 @@ * Pre-processor Definitions ****************************************************************************/ -#ifndef howmany -# define howmany(x, y) (((x) + ((y) - 1)) / (y)) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ @@ -275,7 +272,7 @@ int swcr_hash(FAR struct cryptop *crp, int swcr_authenc(FAR struct cryptop *crp) { - uint32_t blkbuf[howmany(EALG_MAX_BLOCK_LEN, sizeof(uint32_t))]; + uint32_t blkbuf[div_round_up(EALG_MAX_BLOCK_LEN, sizeof(uint32_t))]; FAR u_char *blk = (u_char *)blkbuf; u_char aalg[AALG_MAX_RESULT_LEN]; u_char iv[EALG_MAX_BLOCK_LEN];