summaryrefslogtreecommitdiff
path: root/ecc-mul-a.c
diff options
context:
space:
mode:
Diffstat (limited to 'ecc-mul-a.c')
-rw-r--r--ecc-mul-a.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ecc-mul-a.c b/ecc-mul-a.c
index b23bdc5d..7a537bf6 100644
--- a/ecc-mul-a.c
+++ b/ecc-mul-a.c
@@ -122,8 +122,10 @@ ecc_mul_a (const struct ecc_curve *ecc,
mp_limb_t *scratch_out = table + (3*ecc->size << ECC_MUL_A_WBITS);
int is_zero = 0;
- mp_bitcnt_t blocks = (ecc->bit_size + ECC_MUL_A_WBITS - 1) / ECC_MUL_A_WBITS;
- mp_bitcnt_t bit_index = (blocks-1) * ECC_MUL_A_WBITS;
+ /* Avoid the mp_bitcnt_t type for compatibility with older GMP
+ versions. */
+ unsigned blocks = (ecc->bit_size + ECC_MUL_A_WBITS - 1) / ECC_MUL_A_WBITS;
+ unsigned bit_index = (blocks-1) * ECC_MUL_A_WBITS;
mp_size_t limb_index = bit_index / GMP_NUMB_BITS;
unsigned shift = bit_index % GMP_NUMB_BITS;