]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
build: avoid multiple definition if mpn_cnd_add_n
authorDaiki Ueno <ueno@gnu.org>
Tue, 23 Jul 2024 07:08:16 +0000 (16:08 +0900)
committerDaiki Ueno <ueno@gnu.org>
Tue, 23 Jul 2024 07:08:16 +0000 (16:08 +0900)
When Nettle is built with mini-gmp, mpn_cnd_add_n is always defined in
libhogweed and thus causes a symbol clash when linking with both
libgnutls and the latest libgmp.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
lib/nettle/int/dsa-compute-k.c

index 2fcb2bb80ed52221637d4343c1e7fba760f90798..114af808e060297b89c343520f8d04eba555ec2d 100644 (file)
@@ -104,7 +104,7 @@ int _gnutls_dsa_compute_k(mp_limb_t *h, const mp_limb_t *q, const mp_limb_t *x,
 
        cy = mpn_sub_n(h, h, q, qn);
        /* Fall back to addmul_1, if nettle is linked with mini-gmp. */
-#ifdef mpn_cnd_add_n
+#if defined(mpn_cnd_add_n) && !NETTLE_USE_MINI_GMP
        mpn_cnd_add_n(cy, h, h, q, qn);
 #else
        mpn_addmul_1(h, q, qn, cy != 0);