]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
bliss: Fix compilation with non-GNU C libraries
authorTobias Brunner <tobias@strongswan.org>
Tue, 17 Apr 2018 12:19:19 +0000 (14:19 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 14 May 2018 13:51:42 +0000 (15:51 +0200)
Not even the glibc man page mentions that type.

Fixes #2638.

src/libstrongswan/plugins/bliss/bliss_private_key.c

index 964edcd93db548453498f5e0f3fcfb6af10e6d23..a5b11d4ab6782d79ff8b0aa76d21c938bd156ca6 100644 (file)
@@ -782,7 +782,7 @@ static uint32_t nks_norm(int8_t *s1, int8_t *s2, int n, uint16_t kappa)
        for (i = 0; i < n; i++)
        {
                wrap(t, n, i, t_wrapped);
-               qsort(t_wrapped, n, sizeof(int16_t), (__compar_fn_t)compare);
+               qsort(t_wrapped, n, sizeof(int16_t), (void*)compare);
                max_kappa[i] = 0;
 
                for (j = 1; j <= kappa; j++)
@@ -790,7 +790,7 @@ static uint32_t nks_norm(int8_t *s1, int8_t *s2, int n, uint16_t kappa)
                        max_kappa[i] += t_wrapped[n - j];
                }
        }
-       qsort(max_kappa, n, sizeof(int16_t), (__compar_fn_t)compare);
+       qsort(max_kappa, n, sizeof(int16_t), (void*)compare);
 
        for (i = 1; i <= kappa; i++)
        {